[Gambas-user] Raises the event
Ivan Kern
ivan-kern at ...308...
Fri Jul 13 08:23:19 CEST 2012
Hi to all,
I have made my own gambas component in gambas2 under ubuntu 10.04.
It works well till I want raise an event. I always get an error message
"Cannot raise event in static function."
The code is like this:
'Gambas class file
EXPORT
STATIC PUBLIC $A AS INTEGER
STATIC PUBLIC $B AS INTEGER
EVENT TEST(Value as Boolean)
STATIC PUBLIC SUB Main()
END
STATIC PUBLIC SUB myTest()
DIM iResult AS INTEGER
iResult = $A*$B
IF iResult = 2 THEN
RAISE TEST(TRUE)
ELSE
RAISE TEST(FALSE)
ENDIF
END
How can I manage it?
Regards,
Ivan.
More information about the User
mailing list