gtkD MenuItem addOnActivate

Mike Wey mike-wey at example.com
Sun Jul 24 10:13:50 PDT 2011


On 07/24/2011 06:32 PM, Steve Teale wrote:
> Can anyone who knows about gtkD tell me what is the intention of the MenuItem
> argument to the delegate passed as the first argument to this method.
>
> I was hoping that this was to allow the transfer of some userdata to the
> handler, but I don't see any such provision for adding userdata in the
> MenuItem class.
>
> I have Googled on this topic at some length, but not found any clue. Of
> course, I could be asking the wrong questions.
>
> Thanks
> Steve

The MenuItem in the delegate is the MenuItem that has received the 
signal. To add some userdata you can do one of two things:

1. Use setData and getData to set and retrieve the data these only 
accept pointers though.
2. ₢eating a derived class that includes the userdata should also work.

-- 
Mike Wey


More information about the Digitalmars-d mailing list