[Gambas-user] Form enumeration

Benoit Minisini gambas at ...1...
Mon Mar 20 23:27:34 CET 2006


On Monday 20 March 2006 17:21, Christopher Brian Jack wrote:
> On Mon, 20 Mar 2006, Benoit Minisini wrote:
> > Enumerate the Windows class:
> >
> > FOR EACH hWindow IN Windows
> >   ...
> > NEXT
> >
> > Regards,
> >
> > --
> > Benoit Minisini
>
> Thanks for the suggestion and I'll keep it for future reference.  I worked
> out another way using a registration function called in every form's open
> handler.  Then it's just a matter of making a call to the "CloseAllForms"
> in the module in the Forms' close handlers as well.

This is exactly what is done internally :-)

>
> Next time I write CloseAllForms(who AS Object) in another project I'll use
> the Window class.
>
> I don't like using QUIT becuase sometimes it doesn't work (!!!) and it
> usally dumps a bunch of whining and complaining to the console when it
> does work.

Totally true :-)

QUIT sometimes does not work well, even crashing the interpreter (but it 
should not), and it does not free all memory (it cannot). The complaining 
messages are left to dissuade people from using it :-)

Regards,

-- 
Benoit Minisini





More information about the User mailing list