[Gambas-user] enumerate forms

Benoit Minisini gambas at ...1...
Sun Jan 27 22:15:39 CET 2008


On dimanche 27 janvier 2008, Steven Lobbezoo wrote:
> Le Sunday 27 January 2008 15:41:36 Stefano Palmeri, vous avez écrit :
> > or better:
> >
> > DIM sFormName AS String
> >
> >   FOR EACH sFormName IN Dir(Application.Path, "*.form").Sort()
> >     PRINT file.BaseName(sFormName)
> >   NEXT
> >
> > Stefano
> >
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
> Thanks Stefano.
> I did the same, untill it came to me :-(  that in the execution environment
> these files are not there.
> So, it can't be done like this.
> However, since I can call forms by name (open formname), the data must be
> available somewhere in the executable.
> I will continue playing detective.
>
> Thanks,
> Steven
>

In the executable, you have only the object files, but you can't know anything 
about them before loading them. They are loaded the first time the class is 
used.

Please explain why you need to know the forms of your projects at runtime, 
maybe another way of doing what you want exists.

Regards,

-- 
Benoit Minisini




More information about the User mailing list