July 24, 2011 gtkD MenuItem addOnActivate | ||||
|---|---|---|---|---|
| ||||
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 | ||||
July 24, 2011 Re: gtkD MenuItem addOnActivate | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Steve Teale | 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 | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply