Forum: Ruby-Gnome 2 GTK3, deprecated window.get_pointer() raises exception

8e16f7669af5b4ecfa4f2b89f32b21b6?d=identicon&s=25 Stefan Salewski (Guest)
on 2014-01-20 01:06
(Received via mailing list)
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:in `distribute_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-Janu...

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 Salewski
Please log in before posting. Registration is free and takes only a minute.
Existing account

NEW: Do you have a Google/GoogleMail, Yahoo or Facebook account? No registration required!
Log in with Google account | Log in with Yahoo account | Log in with Facebook account
No account? Register here.