Re: [lazarus] Form designer code inside .pas unit

2007-07-24 Thread Mattias Gärtner
Zitat von Graeme Geldenhuys [EMAIL PROTECTED]: On 23/07/07, Mattias Gärtner [EMAIL PROTECTED] wrote: The lfm reader/writer was at hand at the time. Nowadays we could use the xml reader/writer too, although that is less human readable. Using pascal source as file format would be possible

[lazarus] Form designer code inside .pas unit

2007-07-23 Thread Graeme Geldenhuys
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. Visual Studio and CodeGear's C#

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, 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? The .lfm file is not code. It's a resource, which you can replace at runtime. Michael.

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Graeme Geldenhuys
On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I also assume that it will recreate the form faster than via

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand the resource part. It's components that have been streamed to a file. From this I

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Al Boldi
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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, Al Boldi wrote: 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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Al Boldi
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: 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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: 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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Mattias Gärtner
Zitat von Al Boldi [EMAIL PROTECTED]: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: 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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Michael Van Canneyt
On Mon, 23 Jul 2007, Sergei Gorelkin wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I understand

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Al Boldi
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? The .dfm is being used for two

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Al Boldi
Mattias Gärtner wrote: Zitat von Al Boldi [EMAIL PROTECTED]: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: Graeme Geldenhuys wrote: So again, what is the pros and cons between the two design choices when using the Object Pascal language? .dfm is good

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Sergei Gorelkin
Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Sergei Gorelkin wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Graeme Geldenhuys wrote: On 23/07/07, Michael Van Canneyt [EMAIL PROTECTED] wrote: The .lfm file is not code. It's a resource, which you can replace at runtime. OK, I

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Marco van de Voort
On Mon, Jul 23, 2007 at 02:49:47PM +0300, Al Boldi wrote: 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

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Graeme Geldenhuys
On 23/07/07, Mattias Gärtner [EMAIL PROTECTED] wrote: The lfm reader/writer was at hand at the time. Nowadays we could use the xml reader/writer too, although that is less human readable. Using pascal source as file format would be possible and has some advantages but some disadvantages as well.

Re: [lazarus] Form designer code inside .pas unit

2007-07-23 Thread Marc Weustink
Al Boldi wrote: Michael Van Canneyt wrote: On Mon, 23 Jul 2007, Al Boldi wrote: This really has nothing to do with resources. Resources should still be saved in its own .res file. Forms are stored in resources. A dfm is changed to resource and then compiled in the binary ? The .dfm is