On mercredi 10 décembre 2008, [EMAIL PROTECTED] wrote:
> Hi Gurus!
>
> Sorry for this noop-question:
> In the module area of my component I read a settings file with some
> connection parameters.
> As long as I run the component as a normal Gambas-programm this works
> perfectly. But when I turn it into a component and call one of it's
> exported functions, the function is called directly, without executing the
> code in the module area and my connection parameters are never read.
> Surely there is a another way than putting the reading of the settings file
> into every single function...but which way?
>
> TIA and grretz
> Stevie
>

A class can have an "_init" special static public method that is called the 
first time a class is used. You can use that.

A component written in Gambas has no global initialization function.

-- 
Benoit Minisini

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to