[Gambas-user] Procedure new()

Benoît Minisini gambas at ...1...
Wed Jul 29 16:21:08 CEST 2009


> Benoît Minisini ha scritto:
> >> craf ha scritto:
> >>> Hi.
> >>>
> >>> What are the roles in the general procedure new ()?
> >>> What difference has the procedure Form_Open ()
> >>
> >> If I correctly understand your question...
> >> Regards,
> >> Doriano
> >
> > Or maybe he was talking about "_new()", the constructor?
>
> Yeah... it makes more sense... in this case a old-risen doubt comes to
> my mind: I can't find a documentation for _new(), _init() and perhaps
> other. I suppose _new() is called, then _init(), and finally, in the
> case of a form, Form_Open(). Is it so?
>
> Regards,
> Doriano.
>

Not really:

_init() is called once when the class is loaded. You can see it as the class 
constructor.

_new() is called when the object is created.

Form_Open() is just the event handler of the Open event raised by a Window 
object. It can be raised in many different situations. It usually means that 
the window is going to be shown for the first time.

Regards,

-- 
Benoît




More information about the User mailing list