Re: [Lazarus] Initializing my App

2008-10-29 Thread Mattias Gärtner
Zitat von Felipe Monteiro de Carvalho [EMAIL PROTECTED]: On Tue, Oct 28, 2008 at 4:42 PM, Valdas Jankûnas [EMAIL PROTECTED] wrote: // when form appears procedure TfrMain.FormShow(Sender: TObject); const SHOWED_FIRST_TIME: Boolean=False; Does this work? If this was a variable this

Re: [Lazarus] Initializing my App

2008-10-29 Thread Jalal
// when form appears procedure TfrMain.FormShow(Sender: TObject); const    SHOWED_FIRST_TIME: Boolean=False; Does this work? If this was a variable this surely wouldn't work, because it's scope would be local to the procedure. scope lifetime afaik const are never on the stack. It

[Lazarus] Initializing my App

2008-10-28 Thread Dave Coventry
Hi, How can I tell when my application has loaded and I can start initializing some of the form elements? At the moment I place all of the initialization routines in the FormCreate but quite often I get an 'external SIGSEHV' exception as the mouse generates a false onSelection event on a

Re: [Lazarus] Initializing my App

2008-10-28 Thread Graeme Geldenhuys
On Tue, Oct 28, 2008 at 1:59 PM, Dave Coventry [EMAIL PROTECTED] wrote: At the moment I place all of the initialization routines in the FormCreate but quite often I get an 'external SIGSEHV' exception as the mouse generates a false onSelection event on a StringGrid, presumably because the

Re: [Lazarus] Initializing my App

2008-10-28 Thread Dave Coventry
Hi Graeme, How does the 'Loaded' thing work? 2008/10/28 Graeme Geldenhuys [EMAIL PROTECTED]: On Tue, Oct 28, 2008 at 1:59 PM, Dave Coventry [EMAIL PROTECTED] wrote: At the moment I place all of the initialization routines in the FormCreate but quite often I get an 'external SIGSEHV'

Re: [Lazarus] Initializing my App

2008-10-28 Thread Graeme Geldenhuys
On Tue, Oct 28, 2008 at 3:03 PM, Dave Coventry [EMAIL PROTECTED] wrote: How does the 'Loaded' thing work? As far as I know the form streaming code sets the internal ComponentState as it does it's job. Read the help on Loaded, Loading and ComponentState. Regards, - Graeme -

Re: [Lazarus] Initializing my App

2008-10-28 Thread Valdas Jankūnas
Dave Coventry rašė: Hi, How can I tell when my application has loaded and I can start initializing some of the form elements? At the moment I place all of the initialization routines in the FormCreate but quite often I get an 'external SIGSEHV' exception as the mouse generates a false

Re: [Lazarus] Initializing my App

2008-10-28 Thread Dave Coventry
Thanks Valdas, that's basically what I wanted to know. The event which will only be triggered once the Form is completely loaded. ___ Lazarus mailing list Lazarus@lazarus.freepascal.org http://www.lazarus.freepascal.org/mailman/listinfo/lazarus

Re: [Lazarus] Initializing my App

2008-10-28 Thread Felipe Monteiro de Carvalho
On Tue, Oct 28, 2008 at 4:42 PM, Valdas Jankūnas [EMAIL PROTECTED] wrote: // when form appears procedure TfrMain.FormShow(Sender: TObject); const SHOWED_FIRST_TIME: Boolean=False; Does this work? If this was a variable this surely wouldn't work, because it's scope would be local to the

Re: [Lazarus] Initializing my App

2008-10-28 Thread Jalal
There is a flaw in the code suggested below. To accomplish what you seem to want, the SHOWED_FIRST_TIME variable needs to be an instance variable rather than a local variable as declared below. That is, the SHOWED_FIRST_TIME variable should be declared in the class definition of the form.

Re: [Lazarus] Initializing my App

2008-10-28 Thread Flávio Etrusco
No, there's no problem. A typed constant is allocated just like a global variable (or a static local variable in C). The syntax is hackish, but the functionality is nice, indeed. -Flávio 2008/10/28 Jalal [EMAIL PROTECTED]: There is a flaw in the code suggested below. To accomplish what you seem