Mega Search
23.2 Million


Sign Up

Make a donation  
Re: [Delphi XE3] Stored, Default, NoDefault attribute for pr  
News Group: embarcadero.public.delphi.language.delphi.general

> > > > When we need to declare it?
> > > > What tool is using them?
> > > 
> > > http://docwiki.embarcadero.com/RADStudio/en/Properties
> > 
> > There is not a single word about the attributes!
> > Look at [Stored('IsFontStored')] and [Default(False)]
> 
> http://docwiki.embarcadero.com/RADStudio/XE3/en/Attributes_Index

Please people, read what the OP says before witlessly posting a docwiki link - he's asking about the Stored and Default attributes specifically, which appear to be new to XE3.

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 6-Sep-2012, at 2:48 PM EST
From: Chris Rolliston
 
Re: [Delphi XE3] Stored, Default, NoDefault attribute for pr  
News Group: embarcadero.public.delphi.language.delphi.general
> Some VCL's components have declared Stored, Default or NoDefault attributes for some properties.
> eg.
>     [Stored('IsFontStored')]
>     property Font: TFont read GetFont write SetFont stored IsFontStored;
> or
>     [Default(False)]
>     property ParentColor default False;
> 
> When we need to declare it? 

My guess would be, the compiler-for-mobile in the works (remember Allen Bauer's Delphi.org interview some time ago?) uses custom attributes instead of the classic 'stored', 'default' and 'nodefault' directives, and DCC (i.e., the current Delphi compiler) is being changed to accept either the directives or the new-style attributes. I can't see the directives themselves ever being removed from DCC given backwards compatibility concerns.

I should emphasise this is pure speculation on my part, because I've never actually seen the compiler-for-mobile in the flesh (so to speak).

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 6-Sep-2012, at 2:56 PM EST
From: Chris Rolliston
 
Re: [Delphi XE3] Stored, Default, NoDefault attribute for pr  
News Group: embarcadero.public.delphi.language.delphi.general
> {quote:title=Chris Rolliston wrote:}{quote}
> Please people, read what the OP says before witlessly posting a docwiki link - he's asking about the Stored and Default attributes specifically, which appear to be new to XE3.

Guilty, as charged.

--
Regards
Bruce McGee
Glooscap Software

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 9-Sep-2012, at 1:13 PM EST
From: Bruce McGee