[Gambas-user] following up the menu sig11 question

Benoît Minisini gambas at ...1...
Wed Jan 5 03:28:58 CET 2011


> Thanks for all the help to solve this Ian/Benoit.
> 
> Now I've another problem around this menu.
> 
> In the program, which has multiple modules, I generate the popup menu of
> health issues, on multiple forms. Rather than leave the code duplicated in
> each form on a dozen occurrences or whatever it will be, I removed it to
> another module, and just passed the menu to this, works fine.
> 
> however, having been what I thought was very clever, it then turned out
> that the mnu event  (I called it  "mnuHealthIssues", is unavailable to the
> module that calls this subroutine.
> 
> Is there any want that an event handler generated in another module, can be
> recognised by the module that created the menu?
> 
> Hope that's not too confusing.
> 
> Thanks.
> 
> Richard
> 

Look at Object.Attach(). It will allow you to define which object exactly will 
receive the events generated by your menu.

Regards,

-- 
Benoît Minisini




More information about the User mailing list