[Gambas-user] Dynamic menu click event

Toni arosa at ...2015...
Sat Nov 15 20:45:31 CET 2008


Hi,

I am new to Gambas and I don't know how to solve a problem regarding 
setting events for new objects.
I am creating a dynamic menu, but I don't know how to assign an event 
handler to it.
Here 2 examples of what I've tried without succes:

Not working 1:
[...]
DIM mnu AS Menu
mnu = NEW Menu(PopUPTray)
mnu.Name = "a"

PUBLIC SUB a_Click()
  Message("You clicked on 'a'")
END


Not Working 2: (I Don't really know what's "Action" for, but it seemed 
promising :) )
DIM mnu AS Menu
mnu = NEW Menu(PopUPTray)
mnu.Name = "a"
mnu.Action = "a_Click"
[....]

PUBLIC SUB a_Click()
  Message("You clicked on 'a'")
END


And another question, if I want to publish my application once finished, 
is there a place gambas-specific, other than gambasforge (that seems to 
abandoned and registration doesn't work anymore) ?

Thanks!

Regards,
Toni Rosa




More information about the User mailing list