[Gambas-user] Last in group event handler called as function
tobias
tobiasboe1 at ...20...
Fri Feb 3 21:13:20 CET 2012
hi,
consider the following (where "PickColor" is the event name of a group
of ToogleButton controls)
Public Sub Form_Open()
PickColor_Click()
End
Public Sub PickColor_Click()
Print Last
End
since the event handlers are just subroutines one may call them as every
other sub. i can imagine that Last is set properly for a single event
raising object to avoid errors when the event handler uses Last but is
not a risen event (i haven't looked at any event handler dispatcher code
of the interpreter or something, so i don't know where Last is set). but
what's about an event group? which object will Last be in this
situation? in my code (which is, of course, a bit more complex) i always
get the same ToggleButton printed but i can't spot any reason.
regards,
tobi
More information about the User
mailing list