[lazarus] Custom LCL components still bugging me
andrew johnson
acjgenius at earthlink.net
Fri Nov 15 16:22:28 EST 2002
oops.. I could have responded to this along time ago.. better check my
mail more often! indeed does Sound like the problem with Booleans.. sort
of. The problem with not being able to save boolean values was fixed by
Mattias, and is one of the reason's we now use the 1.0.7 compiler. The
other problem isn't exactly with Booleans,but may be contributing here.
It is that Property Default values Don't act like expected(as compared
to Delphi). This seems to present itself in various ways. one being that
an integer or boolean property without a default is the same as a
default of 0 or False. Which means that any property without a default
but which is initialized to True or 0, will not be allowed to change in
the lfm and therefore is always initialized to False.. never quite
figured that out but that's the way of things.. The other aspect of it
shows what I think is broken behavior in the FPC, that is a Default in
an ancestor of a component acts bizarre, I never traced down the
specifics, but essentially Visible is a TControl Property, which we set
to default TRUE. But, it doesn't act like it is True in the descendants
as it pertains to the LFM.. aka its almost as if you had set the default
to FALSE like in Delphi. So long as it is never put into the lfm this is
not an issue, because it simply uses the REAL default, that is, TRUE.
Anyway.. as you can see this may indeed be at least part of the problem.
perhaps I should figure out the specifics and post it as a bug to
FPC....
BTW, as far as I could tell we get the exact same behavior in Delphi
mode, so I do not think it is another incompatibility there.
Andrew
On Fri, 2002-11-15 at 15:30, Michael.VanCanneyt at Wisa.be wrote:
> On 15 Nov 2002, Tony Maro wrote:
>
> > On Fri, 2002-11-15 at 14:02, Tony Maro wrote:
> > > Wow, that's it... I've learned more about how Lazarus creates forms than
> > > I ever wanted to. ;-)
> > >
> > > When you add this unit to the form, for some reason the form sets
> > > visible := True explicitly declared in the .lfm (and .lrs of course)
> > >
> > > If I add the esdsound unit and EXPLICITLY set the visible property of
> > > the form to false in the designer, the problem does not occur.
> > >
> >
> > I REALLY feel like I'm carrying on a conversation with myself now...
> > sorry I didn't shove all this info into one mail, BUT, thought you'd
> > need like to know that every time I open the project the frmmain.visible
> > property is set back to visible. As long as I set that property to
> > false before I build, the application runs. If I don't the frmmain
> > variable is invalid when the app runs.
> >
> > Now, I KNOW that property probably should be true, but maybe this info
> > will help you guys get closer to the root of the problem...
>
> Wasn't there some problem with reading and writing of boolean properties in
> one of the earlier versions of Lazarus ? maybe this is still a consequence ?
>
> Michael.
>
>
> _________________________________________________________________
> To unsubscribe: mail lazarus-request at miraclec.com with
> "unsubscribe" as the Subject
> archives at http://www.lazarus.freepascal.org/mailarchives
--
andrew johnson <acjgenius at earthlink.net>
More information about the Lazarus
mailing list