[Gambas-devel] Gambas component queries

Laurent Carlier lordheavy at ...141...
Tue Jan 18 18:47:21 CET 2005


Le Mardi 18 Janvier 2005 16:26, Rob a écrit :
> On Tuesday 18 January 2005 05:38, Benoit Minisini wrote:
> > GB_INIT() is called as soon as possible, i.e. when the
> > component shared library is loaded.
>
> Oops, my bad.  What I described to Srikanta for the init function
> was actually the _new method implementation.
>
> Rob
>

An object can have an init method :)

http://www.binara.com/gambas-wiki/bin/view/Gambas/HowToProgramComponentsSpecialMethods

The _init special method 
The _init method is called when the class is loaded by the interpreter. It 
must be declared this way : 

GB_STATIC_METHOD ( "_init" , NULL , MyClass_init , NULL ) 

Use this method to do class specific initializations. 

Regards,

-- 

Laurent Carlier




More information about the Devel mailing list