[Gambas-user] Procedure new()

Doriano Blengino doriano.blengino at ...1909...
Wed Jul 29 09:52:08 CEST 2009


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, the reply is the following. 
new() is a generic language construct which creates new objects 
(instances of a class). Several gambas objects like Lists, Controls, 
Forms and so on are put to life with new(), more or less explicitly. 
Form_Open is an event; when you (or Gambas on your behalf) display a 
form for the first time, this procedure is called to let you do your 
stuff in that precise moment. It is common to put several new()'s in 
this procedure, to prepare data the form will use, but those statements 
could be put instead elsewhere: it depends on the logic of the program. 
This is the only relationship between new() and Form_Open().

I hope this is the right reply to your question.

Regards,
Doriano





More information about the User mailing list