[Gambas-user] Events not firing in dynamically instantiated forms.

T Lee Davidson t.lee.davidson at ...626...
Thu Nov 27 18:50:22 CET 2014


On 11/27/2014 08:39 AM, Benoît Minisini wrote:
> Le 27/11/2014 14:29, Stephen a écrit :
>> I'm not consciously overriding the event observer so I'm not clear how
>> to not do it.
>> Obviously I still have much to learn.
>>
>
> mhForm1 = New Form1(TabStrip1) As "Form1"
>                                  \________/

Now *I'm* confused. The documentation for "New" 
(http://gambaswiki.org/wiki/lang/new) gives its syntax as:
Object = NEW Class [ ( Constructor parameters... ) ] [ AS Name ]


And, there is a warning box that says, "If you forget to specify the 
Name part, your object will never raise events!"

But after stripping "As Form1" off the end of that line, the form 
obviously *does* raise events.

Is the documentation in need of correction? If so, what should that 
warning actually say?


-- 
Lee
__________

"Artificial Intelligence is no match for natural stupidity."




More information about the User mailing list