unmapped event in wxruby 1.9.8

E

Eric Will

[Note: parts of this message were removed to make it a legal post.]

Hello,
I'm not sure what's going on with the latest WxRuby. Yesterday, my Vista
machine at work did an update and suddenly all of my WxRuby applications had
the Vista theme. That was nice, but they were also all crashing just by
moving the mouse around them or resizing the window. So, I checked to see if
WxRuby had a update, and so it did.

Updating seems to have fixed the crashing; however, after the update I
started getting this error:

warning: Unmapped event type 10092

So, after writing this little one-liner to figure out which event name that
was:

require 'wx'; a=Wx.constants.grep(/evt/i).find { |x| (eval('Wx::' + x) ==
10092) }; puts a

I come up with EVT_NAVIGATION_KEY. This warning was getting spit out
whenever someone hits the tab key. As it turns out, for some reason they
"forgot" to map EVT_NAVIGATION_KEY to an actual Wx::Event class
in Wx::EvtHandler::EVENT_TYPE_CLASS_MAP. After checking for some obvious
class by doing `Wx::constants.grep /Event/` I can't figure out which one it
should be mapped to. I have fixed the warning by doing this:

Wx::EvtHandler::EVENT_TYPE_CLASS_MAP[10092] = Wx::Event

But obviously that won't fix the event for anyone that relies on it (or at
least, I don't think it will). So ultimately, I'm wondering if anyone out
there knows which Wx::Event class this should be mapped to.

Thanks.
 
A

Alex Fenton

Eric said:
I'm not sure what's going on with the latest WxRuby.

Thanks for reporting it. Generally, queries about wxRuby are better
directed to the wxruby-users mailing list:

http://wxruby.rubyforge.org/wiki/wiki.pl?MailingLists
Yesterday, my Vista
machine at work did an update and suddenly all of my WxRuby applications had
the Vista theme. That was nice, but they were also all crashing just by
moving the mouse around them or resizing the window. So, I checked to see if
WxRuby had a update, and so it did.

Information about wxRuby on Vista is welcome because I don't believe any
of the core dev team have access to this OS.
Updating seems to have fixed the crashing;

Good news, though I've no idea why Vista's update should have broken it
in the first place, or why 1.9.8 should fix it again ;)
however, after the update I started getting this error:

warning: Unmapped event type 10092

This warning is generally harmless, and only appears if running under
-w. But please do report it on the wxRuby bugtracker, ideally with a
short, self-contained sample that reproduces it.
But obviously that won't fix the event for anyone that relies on it (or at
least, I don't think it will). So ultimately, I'm wondering if anyone out
there knows which Wx::Event class this should be mapped to.

Consulting the wxWidgets sources, it seems it should map to
Wx::NavigationKeyEvent. This doesn't currently exist in wxRuby, but can
do. This is one of a number of classes which are in Wx, but not
documented in the C++ docs, so have to get picked up through the
warnings like that.

cheers
alex
 
E

Eric Will

[Note: parts of this message were removed to make it a legal post.]

Reported as [21933].
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top