RE: [Java-gnome-developer] Question concerning pixel graphics (fw d)
Brought to you by:
afcowie
From: Jeffrey M. <Jef...@Br...> - 2001-11-07 20:24:48
|
Hopefully this problem was fixed when I implemented the inheritance. Prior to the most recent change GdkEvent and GdkButtonEvent both inherited from BaseBoxed but GdkButtonEvent didn't inherit from GdkEvent. Therefore when you tried to cast from a GdkEvent to a GdkButtonEvent the Java runtime didn't corporate. Please try it with last nights changes and let me know if this is still a problem. -Jeff > As for the zoom method, I have another question: > > ----------------------------- > ... > // the EventMask is configured properly > drwarea.signalConnect("button_press_event", "zoomStart", this); > ... > public boolean zoomStart(GdkEvent event) > { > if (event.getType().test(GdkEventType.BUTTON_PRESS)) { > System.out.println("button_pressed_event caught"); > } else { > System.out.println("Something happend"); > } > return(false); > } > ... > ----------------------------- > > prints "button_pressed_event caught". So far, so good. But if > I try to > cast > > ----------------------------- > GdkEventButton e = (GdkButtonEvent) event; > ----------------------------- > > nothing happens (the method seems to stop at the cast). > When I try > > ----------------------------- > public boolean zoomStart(GdkEventButton event) > ----------------------------- > > I get the warning (and, as you would expect, the method isn't called > :-)) > > ----------------------------- > *** WARNING ***: Java-GNOME - cannot find callback method zoomEnd in > the specified object with signature (Lgnu/gdk/GdkEvent;)Z > ----------------------------- > > My fault? Lack of knowledge about gtk/gdk? Or feature? :-)) > > MfG Markus > |