Graeme Geldenhuys wrote:
> Hi,
>
> What are the pros and cons for letting the form designer add code
> inside the .pas unit instead of a separate .lfm file?
>
> For example:
>   Lazarus and Delphi uses external files (.lfm and .dfm) to save
> information about forms designed using the form designer.

.dfm is a straight copy-cat from VB, to obscure code structure for beginners.
It's probably one of the worst mistakes Delphi could mimic

>  Visual Studio and CodeGear's C# IDE's use the source code unit
> directly instead of a external unit.  They embed the form/component
> creation code inside a private method called from the constructor. The
> code in that private method is also wrapped in C# Region so that it is
> hidden by default with code folding.

Java always did it like this, and now others are starting to mature.

> So again, what is the pros and cons between the two design choices
> when using the Object Pascal language?

.dfm is good for beginners, who get confused looking at code they didn't write.

.pas is good for pros, who need to take control of their project code.


Thanks!

--
Al

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to