[Lazarus] Hook TComponent streaming system
Michael Van Canneyt
michael at freepascal.org
Mon May 24 16:25:30 CEST 2010
On Mon, 24 May 2010, Luiz Americo Pereira Camara wrote:
> Mattias Gaertner escreveu:
>> On Sun, 23 May 2010 23:37:29 -0300
>> Luiz Americo Pereira Camara <luizmed at oi.com.br> wrote:
>>
>>
>>> Mattias Gaertner escreveu:
>>> [...]
>>> Here's the actual code (calls a generic TForm descendant):
>>>
>>> The article: http://lazarusroad.blogspot.com/
>>>
>>
>> The article does not explain why the properties must be set before
>> calling Loaded.
>>
>
> If
> procedure TMyForm.Loaded;
> begin
> inherited;
> if MyBool then
> DoAction;
> end;
>
> MyBool will be always false even if called through
>
> ShowForm(TMyForm, nil, ['MyBool', True]);
>From your code it is not clear what you are trying to achieve.
>From the article also it is not clear. Why are you trying to
do this ? If the property is published, it's value is in the
.lfm file, so what is the point of setting it separately ?
Are you trying to use 'custom TForms' with extra properties?
In that case it is easier to simply use Lazarus' or Delphi's
support for it. I do it every day; I have many thousands of such forms.
Michael.
More information about the Lazarus
mailing list