Hi Steve,
On 2014-05-11 21:30:54 +0000, Steve Cookson - gmail said:
On 11/05/14 18:03, Richard Faasen wrote:
I've been trying to get Wx::TaskBarIcon to work on OS X. I got the icon
to show up in the menubar, but I can't get a popup menu to show. I
understand none of the events are working on OS X so I've created a
subclass to override CreatePopupMenu but it doesn't get called either.
Am I doing something obvious wrong? I'm using wxWidgets 2.9.4, wxPerl:
0.9922.
Don't you need have some code like this line?
Wx::Event::EVT_TASKBAR_CLICK( $self, $self->{TaskBarIcon},
\&MyTaskBarIcon::CreatePopupMenu);
I tried all possible events but none of them are being called.
Also in the wx docu it says that for wxCocoa events are not called and
you should override the the CreatePopupMenu() callback instead.
http://docs.wxwidgets.org/trunk/classwx_task_bar_icon.html#a5f67b426e34077c690c49f4e6dcc6919
But EVT_TASKBAR_CLICK would still have to be wrapped. It's not hard to
do, just browse this list and there are plenty of examples of wrapping.
But the doc doesn't say it's not wrapped, are you sure?
http://docs.wxwidgets.org/trunk/classwx_task_bar_icon.html
I guess it would be in wxPerl/XS/TaskBarIcon.xs
I'm not sure what wrapping is exactly and I can't find any xs file that
belongs to WxPerl.
I think that isn't the problem. I think the TaskBarIcon works
differently in OS X, it doesn't work by events but with this
CreatePopupMenu callback but for some reason it's never called.
If anyone likes to take a look I have a simple test script that
demonstrates the problem.
Richard