[Lazarus] When do I need a component rather than a plain object?

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Nov 16 11:13:10 CET 2010


Op 2010-11-16 11:45, Frank Church het geskryf:
> It will be good if Lazarus can generate the source code to initialize
> components at the start of a program, rather than stream them in,
> hopefully in a future version. It makes revision control much easier, a
> lot more transparent.

Interestingly, this is exactly why I took the "generate source code instead
of a form file" approach with fpGUI's UI Designer. One unit to worry about,
predictable creation order, easy search-and-replace of components or
properties (refactoring or global changes etc), components can be in the
private section of forms where they belong, form upgrades to new or changed
properties are easy to handle, easier form loading with high tolerance for
error handling etc, etc...

I think Lazarus would benefit much from such an addition to it's form
designer. Pascal was supposed to be an easy language. So why emulate the
C-style (multiple files requirement) in Pascal?

Other toolkits that also generate source code from their Visual Form
Designers are Visual Studio with .NET, Qt Designer, KDE Designer, etc.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://opensoft.homeip.net:8080/fpgui/





More information about the Lazarus mailing list