Hi, I ran into the following: uninitialized constant Gdk::Keyval::GDK_F5 I have the following versions: x11-libs/gtk+-2.22.1 dev-libs/glib-2.26.1 dev-ruby/ruby-gtk2-0.19.4 I understand that the constant naming is changed in newer GTK+. How could i support newer and older constant namings? Should i use the value instead? Thanks in advice,
on 2010-12-29 08:28
on 2010-12-31 03:00
2010/12/29 Dobai-Pataky Blint <dpblnt@gmail.com>: > > without downtime or disruption > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > ruby-gnome2-devel-en mailing list > ruby-gnome2-devel-en@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/ruby-... > > Hi. The old names should be valid under gnome 2. I think they will be dropped in gnome 3. If needed you can define the new constants. Here is a small hack to be tested. require 'gtk2' module Gdk module Keyval begin GDK_KEY_a rescue NameError constants.each{|key| const_set(''GDK_KEY_'+key[4..-1], eval(key))}#TODO : compare string key to /^GDK_/ end end end -- Vincent Carmona
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.