Re: [Java-gnome-developer] error defining signals with glade
Brought to you by:
afcowie
From: Andrew C. <an...@op...> - 2005-05-28 05:24:55
|
On Fri, 2005-27-05 at 14:19 -0700, Keith Irwin wrote: > On Fri, 2005-05-27 at 22:58 +0200, Oláh Gábor wrote: > > i am trying to write a simple app using java-gnome and glade, but i > > receive an error whenever i try to define a signal for a button in > > glade. While signal autoconnection from LibGlade works in many circumstances, you're going to have problems when you try to connect signals with complex prototypes. So, frankly, if you're working in java-gnome, I would recommend you use the WhateverWidget whatever = (WhateverWidgit) glade.getWidget("whatever"); ... whatever.addListener(new WhateverListener() { public void whateverEvent(WhateverEvent event) { // your code here } }); construct that is familiar from other Java graphical user interface toolkits. Personally, I find that whole thing just a little ugly, but I have to admit that having done both ways, I find that the Listener/Event way provides much greater control over the events, especially in terms of getting to the details of the event. So that's what I recommend. [Eclipse makes this dead easy, by the way] AfC Calgary -- Andrew Frederick Cowie Technology strategy, managing change, establishing procedures, and executing successful upgrades to mission critical business infrastructure. http://www.operationaldynamics.com/ Sydney New York Toronto London |