Watch, Follow, &
Connect with Us
Public Report
Report From:    [ Add a report in this area ]  
Report #:  33827   Status: Need Feedback
Default property values is inconsistent
Project:   Build #:  10.0.2288.42451
Version:    10.0 Submitted By:   Patrick Hayes
Report Type:  Basic functionality failure Date Reported:  9/12/2006 7:32:07 AM
Severity:    Infrequently encountered problem Last Updated: 12/20/2007 1:52:11 PM
Platform:    All versions Internal Tracking #:  
Resolution: Need More Info (Resolution Comments) Resolved in Build: : 11.0.2902.10471
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
if a property has a default directive, it doesn't allways generate correct code. neither does the [DefaultValueAttribute].
Steps to Reproduce:
the following property fails to generate proper code:

property test : Boolean read ftest write ftest default true;

This should generate the following:
[DefaultValue(True)]
property test : Boolean read ftest write ftest;

but instead it generates:
[DefaultValue((Short)(-1))]
property test : Boolean read ftest write ftest;

and the following code:
[DefaultValue(0)]
property test : integer read Ftest write Ftest;

generates:
[DefaultValue((byte)0)]
property test : integer read Ftest write Ftest;

which is also wrong.


Workarounds
use the explicit way [DefaultValue(...)] if the default directive doesn't work.

trial and error...
Attachment
None
Comments

None

Server Response from: ETNACODE01