GTK3, deprecated window.get_pointer() raises exception

Hello,

recently I tried porting an application to GTK3
(http://www.ssalewski.de/PetEd.html.en)

using Ruby 2.0 and ruby-gnome2-2.1.0 shipped with Gentoo-Linux (AMD64)
in default configuration.

Basically it works fine, I got some warnings about deprecated stuff
which I fixed.

Unfortunately use of deprecated Gtk::Widget#pointer raised an exception.

/usr/lib64/ruby/site_ruby/2.0.0/glib2/deprecatable.rb:136:in block in __define_deprecated_method__': pet/peted.rb:588:indistribute_events’:
‘Gtk::Widget#pointer’ has been deprecated. Use
‘Gdk::Window#get_device_position’.

Following a recent discussion on GTK mailing list

https://mail.gnome.org/archives/gtk-list/2014-January/msg00020.html

On Fri, 2014-01-17 at 17:26 -0500, Jasper St. Pierre wrote:
It doesn’t seem like there’s anything wrong with using the deprecated

methods, then. File a bug with the Ruby GTK3 bindings, and continue
using
window.get_pointer(); for now would be my suggestion.

On Fri, 2014-01-17 at 19:19 -0500, Jasper St. Pierre wrote:

Deprecated methods should not raise an exception. Deprecated methods
shouldn’t stop working because they’re deprecated.

it is difficult to avoid window.get_pointer() when keyboard input for
CAD applications require mouse coordinates. GTK-Developers consider
continuing using window.get_pointer(). So it would be nice if
Ruby-Gnome2 would not raise an exception and abort the program in
default setup.

Best regards,

Stefan S.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs