# Unmapped event in wxruby 1.9.8

**URL:** <https://www.ruby-forum.com/t/unmapped-event-in-wxruby-1-9-8/148401>\
**Category:** Ruby\
**Created:** [September 12, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/unmapped-event-in-wxruby-1-9-8/148401 "2008-09-12T15:09:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 12, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/unmapped-event-in-wxruby-1-9-8/148401/1 "2008-09-12T15:09:23Z")

</div>

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)

1. }; 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.

–  
Eric W.  
EBL Engineers  
National Institutes of Health  
xmpp:removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 12, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/unmapped-event-in-wxruby-1-9-8/148401/2 "2008-09-12T16:35:37Z")

</div>

Eric W. wrote:

> 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](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

---

<div class="post-metadata">

**Author:** ![ericw](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/97f17d/32.png) [@ericw](https://www.ruby-forum.com/u/ericw)\
**Post date:** [September 12, 2008, 4:53pm UTC](https://www.ruby-forum.com/t/unmapped-event-in-wxruby-1-9-8/148401/3 "2008-09-12T16:53:12Z")

</div>

Reported as [21933].  
Thanks.

–  
Eric W.  
EBL Engineers  
National Institutes of Health  
xmpp:removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)
