[Lazarus] OOP basics
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Apr 15 16:11:26 CEST 2010
On 15 April 2010 15:31, Marc Weustink <marc.weustink at cuperus.nl> wrote:
> The lazarus/delphi forms designer uses RTTI for created components. RTTI is
> only created for published members of a class so for that they need to be
> published.
That's exactly why fpGUI UI Designer doesn't use RTTI. Down side is
you need to tell the UI Designer what should be available in the
Object Inspector. Up side is that the controls on the forms or
properties of a component can have any visibility, and the UI Designer
will still work. And as a "catch all" where you need to set a
property, but it isn't in the Object Inspector, there is a 'Unknown
Lines' memo in the Object Inspector that will store whatever you typed
in there exactly as is, in the generated code. And it also does the
reverse, when loading a form or component properties it doesn't know
about, it adds those to the Unknown Lines memo.
> available. But from a class design pov it would have been nice if there was
> a 2nd way to tell the compiler to generate RTTI for some non-published
> members
I guess that is where Java and .NET's Reflection is better than FPC's
RTTI. With Reflection you can accesss anything information about a
class (well so I hear - I don't use Java or .NET).
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
More information about the Lazarus
mailing list