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?
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