[Lazarus] Hook TComponent streaming system
Michael Van Canneyt
michael at freepascal.org
Mon May 24 19:47:22 CEST 2010
On Mon, 24 May 2010, Luiz Americo Pereira Camara wrote:
> Michael Van Canneyt escreveu:
>>
>>
>> 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 ?
>
> See the previous mail. The property is not in the lfm, it's set at runtime.
>>
>> 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.
>
> I'm interested. Can you show me an example?
There is an example in lazarus/components/customform.
I also wrote an article on it. If you're interested, I can send it to
you tomorrow.
Michael.
More information about the Lazarus
mailing list