From: Kouhei S. <ko...@co...> - 2015-01-05 02:34:11
|
Hi, Thanks for your reports. They are very helpful! In <54A...@gm...> "[ruby-gnome2-devel-en] gdk3 deprecated Keyvals does not work" on Sun, 04 Jan 2015 18:58:29 +0100, Detlef Reichl <det...@gm...> wrote: > in gdk3/lib/gdk3/deprecated.rb the definition of deprecated Gdk::Keyval > constants does not work. > > require 'gdk3' > p Gdk::Keyval.constants > > only shows constants in the format of > [:KEY_0, :KEY_1, :KEY_2, :KEY_3, :KEY_3270_AltCursor, ... > > but not > [:GDK_KEY_0, :GDK_KEY_1, :GDK_KEY_2, :GDK_KEY_3, > :GDK_KEY_3270_AltCursor, ... It's expected result. Deprecated definitions are defined on demand by const_missing technique. > If you try to access a special constant like > p Gdk::Keyval::GDK_KEY_minus > > it gives the error message: >> /home/det/.gem/ruby/2.1.0/gems/glib2-2.2.5/lib/glib2/deprecatable.rb:96:in `const_missing': uninitialized constant Gdk::Keyval::GDK_KEY_minus (NameError) >> from ./gi-test2.rb:7:in `<main>' >> det@ubuntuVbox:~/Schreibtisch$ ./gi-test2.rb >> /home/det/.gem/ruby/2.1.0/gems/gobject-introspection-2.2.5/lib/gobject-introspection/loader.rb:306:in `validate_arguments': Gdk::Keyval#.name: wrong number of arguments (0 for 1) (ArgumentError) >> from /home/det/.gem/ruby/2.1.0/gems/gobject-introspection-2.2.5/lib/gobject-introspection/loader.rb:82:in `block in define_module_function' >> from /home/det/.gem/ruby/2.1.0/gems/gobject-introspection-2.2.5/lib/gobject-introspection/loader.rb:86:in `call' >> from /home/det/.gem/ruby/2.1.0/gems/gobject-introspection-2.2.5/lib/gobject-introspection/loader.rb:86:in `block (2 levels) in define_module_function' >> from /home/det/.gem/ruby/2.1.0/gems/glib2-2.2.5/lib/glib2/deprecatable.rb:99:in `const_missing' >> from ./gi-test2.rb:7:in `<main>' I've fixed it at master. Thanks, -- kou |