Uninitialized constant Gdk::Keyval::

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,

2010/12/29 Dobai-Pataky B. [email protected]:

without downtime or disruption
Best Open Source Mac Front-Ends 2023


ruby-gnome2-devel-en mailing list
[email protected]
ruby-gnome2-devel-en List Signup and Options

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 C.

This resolved it.
Thanks Vincent