[wxruby-users] lose focus event? *Works in XP ; fails in OS X*

David Morton
Mon, 21 Jan 2008 00:16:07 -0000

Starting over on this thread.  I found an example in the sample code
controls/controls.rb  around line 110-149:


class MyComboBox < ComboBox
   def initialize(parent,id,value = EmptyString,
                   pos = DEFAULT_POSITION,
                   size = DEFAULT_SIZE,
                   choices = [],
                   style = 0)
     super(parent, id, value, pos, size, choices)#, style)

     evt_char {|event| onChar(event)}
     evt_key_down {|event| onKeyDown(event)}
     evt_key_up {|event| onKeyUp(event)}

     evt_set_focus {|event| onFocusGot(event)}
   end

  # [snip]

   def onFocusGot(event)
	log_message("MyComboBox::OnFocusGot")
     event.skip()
   end
end

I uncommented that log_message call in onFocusGot().  It works in
WinXP, but it does not work in OS X.  In XP, I get a popup with that
message, but in OS X, nothing happens at all. Eventually the pp is
going to be used in XP, but I''d like to develop on OS X.  Any ideas?




David Morton
Maia Mailguard http://www.maiamailguard.com
mortonda at dgrmm.net



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)

iD8DBQFHk+RHUy30ODPkzl0RAtXYAKDINuBBaAqfOEfJRUajNpPKedileACg06VR
vxNQodbw6F0UErkeI5JuTKY=tMwM