 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Mansour Guest
|
Posted: Thu Aug 28, 2003 11:45 am Post subject: default value ? |
|
|
Hi,
I define property :
__property bool Look3D = { read=FLook3D, write=FLook3D, default=1 };
but in object inspector default value is false !
whats problem ?
Thanks M.T
|
|
| Back to top |
|
 |
Ralph Kazemier Guest
|
Posted: Thu Aug 28, 2003 12:53 pm Post subject: Re: default value ? |
|
|
"Mansour" <sasan_vm (AT) yahoo (DOT) com> wrote
| Quote: | Hi,
I define property :
__property bool Look3D = { read=FLook3D, write=FLook3D, default=1 };
but in object inspector default value is false !
whats problem ?
|
The VCL streaming system will only write the value of a property to dfm when
its value does not equal the default value (or when no default value is
specified). The default specifier only *informs* the VCL streaming system
what the default value for a property is. The component itself is
responsible for actually initializing the property with its default value.
The best place to do this is the constructor. You probably did not do that.
Which would result in a false value for a boolean (by default all the memory
a VCL class instance holds is nulled out).
Ralph
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|