java-gnome-developer Mailing List for The java-gnome language bindings project (Page 41)
Brought to you by:
afcowie
You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(37) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(2) |
Feb
(20) |
Mar
(20) |
Apr
(8) |
May
|
Jun
(1) |
Jul
(6) |
Aug
(39) |
Sep
(37) |
Oct
(34) |
Nov
(50) |
Dec
(22) |
2002 |
Jan
(7) |
Feb
(13) |
Mar
(32) |
Apr
(16) |
May
(26) |
Jun
(20) |
Jul
(32) |
Aug
(7) |
Sep
(2) |
Oct
(11) |
Nov
(3) |
Dec
(35) |
2003 |
Jan
(11) |
Feb
(3) |
Mar
(8) |
Apr
(3) |
May
(11) |
Jun
(20) |
Jul
(11) |
Aug
(29) |
Sep
(13) |
Oct
(91) |
Nov
(185) |
Dec
(207) |
2004 |
Jan
(108) |
Feb
(171) |
Mar
(207) |
Apr
(113) |
May
(22) |
Jun
(53) |
Jul
(69) |
Aug
(43) |
Sep
(34) |
Oct
(182) |
Nov
(101) |
Dec
(61) |
2005 |
Jan
(86) |
Feb
(45) |
Mar
(106) |
Apr
(67) |
May
(70) |
Jun
(47) |
Jul
(19) |
Aug
(34) |
Sep
(24) |
Oct
(45) |
Nov
(20) |
Dec
(58) |
2006 |
Jan
(21) |
Feb
(21) |
Mar
(16) |
Apr
(24) |
May
(24) |
Jun
(47) |
Jul
(20) |
Aug
(8) |
Sep
(13) |
Oct
(7) |
Nov
(23) |
Dec
(2) |
2007 |
Jan
|
Feb
(14) |
Mar
(3) |
Apr
(11) |
May
(1) |
Jun
(15) |
Jul
(2) |
Aug
(5) |
Sep
(10) |
Oct
(5) |
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(13) |
Mar
(13) |
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
(5) |
Aug
(7) |
Sep
(2) |
Oct
(14) |
Nov
(11) |
Dec
(12) |
2009 |
Jan
(30) |
Feb
(4) |
Mar
(16) |
Apr
(9) |
May
(9) |
Jun
(7) |
Jul
(6) |
Aug
(3) |
Sep
(14) |
Oct
(8) |
Nov
(12) |
Dec
(9) |
2010 |
Jan
(4) |
Feb
(27) |
Mar
(6) |
Apr
(4) |
May
(3) |
Jun
(13) |
Jul
(6) |
Aug
(15) |
Sep
(15) |
Oct
(12) |
Nov
(11) |
Dec
(9) |
2011 |
Jan
(12) |
Feb
(11) |
Mar
|
Apr
(3) |
May
|
Jun
(3) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
(8) |
Nov
(1) |
Dec
|
2012 |
Jan
|
Feb
(10) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
(2) |
Sep
(7) |
Oct
(7) |
Nov
|
Dec
(4) |
2013 |
Jan
(8) |
Feb
(1) |
Mar
(1) |
Apr
(2) |
May
(3) |
Jun
(3) |
Jul
(16) |
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
(1) |
2014 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2016 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Nicholas R. <ni...@mn...> - 2005-05-30 08:04:02
|
Hi, I have reusable glade components in my java-gnome application. for example, if you have a Frame (or an HBox or whatever widget) and want to reuse that widget in several places in your application, you can get an instance of that widget using the following code: try { myframe_glade = new LibGlade( getClass(). getResourceAsStream( "/myapp.glade" ), this, "my_reusable_frame" ); } catch ( Exception e ) { e.printStackTrace(); } What this does is create a new LibGlade instance that starts at the "my_reusable_frame" widget node in the glade XML file "myapp.glade" (NOTE: that i'm loading the glade XML file as a resource (from within a JAR file actually), but you could just pass a file name (String) as the first parameter too.) You can then call: (Frame)myframe_glade.getWidget( "my_reusable_frame" ) to get that Frame instance. You can also get any widgets that are defined as sub-widget nodes of "my_reusable_frame" by calling myframe_glade.getWidget( "widget_in_my_reusable_frame" ). The downside of this is that you're parsing your glade file once for each LibGlade object you create. In practice i've found that libglade parses the XML file very quickly and that this does not really slow things down, but perhaps my glade file is not that big. :-) Also you do have multiple LibGlade objects lying around. You'll probably want to have a class (MyReusableFrame) that includes myframe_glade as one of it's members (calling the above code in the constructor, for example) and then instantiate this class whenever/wherever you need that frame. Hope this helps, Nick On Sat, 2005-05-28 at 21:16 +0200, Tomasz Mielnik wrote: > Hi > I'm still lerning java-gnome together with glade capabilities so i > encountered a issue that I can't solve. > > Is there w way to build a window inside glade editor ant then use this > window as my own widget inside other windows (ie; in other VBox)? > Or how can I achieve this functionality with java-gnome/glade? > > In SWT for instance there this concept of Shells Where toplevel window > is a shell and any container is a Shell including top level window in > another container is straightforward. > > Any help as always is appreciated. > |
From: Joao V. <jvi...@ya...> - 2005-05-29 15:44:29
|
--- Tomasz Mielnik <tmi...@co...> escreveu: > well actually this is what I was afraid of. I think it would be better > to design your "components" in visual tool and then use them. Well, i too think it would be better to design components in a visual tool, but the visual tool is just not ready; patience. I don't know when Glade 3 will be released, but there is Gazpacho, which is based on a pre-Glade3 code, and _maybe_ it can do that: http://gazpacho.sicem.biz/ I've never tried it, maybe i'll do this today. > > But before givin' up I want to ask some GTK gurus here. What for is a > methond > > Window.makeWidget(handle); ? > I thought that using this > > Window.makeWidget(myWidget.getHandle()); > would work? You shouldn't use that method; it's just for internal use (the reason why it's not private/protected/etc is because it may be used by other bindings in other packages). To do what you want you would just instantiate a Widget like you'd do with any Java object. Example: public class MyWidget extends VBox { public MyWidget() { super(); add(new Button("Hello World")); } } then use it: Window win = new Window(WindowType.TOPLEVEL); win.add( new MyWidget() ); Cheers, J.V. __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
From: Michael K. <mk...@gm...> - 2005-05-29 10:41:47
|
> > I think the method needs to be void: > > > > public void on_button1_clicked() { > > System.out.println("clicked"); > > } > > > > If you check out the tutorial on the java-gnome site, I think it > > explicitly says this somewhere. > you are right, but it does not make any difference, either :-((. > > cheers > gaboro Hello, I'm new to JG and this list, but perhaps I can help ... I have Ubuntu Hoary, too, and I encountered the same problem. I updated to JG 2.10 and everything runs fine. I'm not aware of Hoary packages for JG 2.10 so you have to compile it yourself. Cheers, Michael |
From: Remy S. <rem...@gm...> - 2005-05-29 09:29:49
|
> > I have the same problem still. > maybe it's the problem of old java-gnome version? > I use : > libgladejava2.8.so > libgtkjava2.4.so > libgnomejava2.8.so It might be a version issue. I'm running Java 1.4.2_08, libgtk-java 2.6.1, libgnome-java and libglade-java at 2.10.1 myself. I was able to run the code that Olah provided with no problems. Regards, Rem |
From: Tomasz M. <tmi...@co...> - 2005-05-29 08:50:39
|
Dnia 28-05-2005, sob o godzinie 22:35 +0200, Oláh Gábor napisał(a): > 2005-05-28, szo keltezéssel 13.25-kor Keith Irwin ezt írta: > > I think the method needs to be void: > > > > public void on_button1_clicked() { > > System.out.println("clicked"); > > } > > > > If you check out the tutorial on the java-gnome site, I think it > > explicitly says this somewhere. > you are right, but it does not make any difference, either :-((. I have the same problem still. maybe it's the problem of old java-gnome version? I use : libgladejava2.8.so libgtkjava2.4.so libgnomejava2.8.so regards. -- t.m. Tomasz Mielnik |
From: Joao V. <jvi...@ya...> - 2005-05-29 00:16:33
|
--- "Neil J. Patel" <njp...@gm...> escreveu: > Hi, Hi Neil, > I was inspired by an OSNews article yester which pointed out developing > gnome apps with java. I follwed the examples and all worked fine (with a > little tweaking), the question i have is that a very simple application > compiled with gcj takes up quite a lot of memory: > > Total : 55.1 MB > RSS : 22.1 MB > Shared : 16.3 MB > > I just wanted to now if this is normal, and/if there are any option when > compiling that can help. It would be interesting if we'd create an example in C and Java, and make a comparison. Let's put this in our TODO list. I think those numbers are "normal": gtk itself takes lots of memory, and there's also the VM (mainly the garbage collector). Currently JG is going through a major memory management improvement, though. Cheers, J.V. __________________________________________________ Converse com seus amigos em tempo real com o Yahoo! Messenger http://br.download.yahoo.com/messenger/ |
From: Joao V. <jvi...@ya...> - 2005-05-29 00:08:35
|
--- Tomasz Mielnik <tmi...@co...> escreveu: > Hi Hi Thomas, > I'm still lerning java-gnome together with glade capabilities so i > encountered a issue that I can't solve. > > Is there w way to build a window inside glade editor ant then use this > window as my own widget inside other windows (ie; in other VBox)? > Or how can I achieve this functionality with java-gnome/glade? > If i understood correctly, you want to have some kind of widget (like a HBox) which you can use in many windows. In my opinion, the best way to do that is doing it in code, instead of Glade. For example, you'd create a class which extends gtk.HBox. In the constructor you'd add anything you want; and then you'd just do 'new MyWidget()' do add it wherever you want. I've done that before, could send you the code if you want. Glade 2, IMHO, was made thinking of building Windows; so it's not very nice for just building components. It shouldn't be like this (and i think Glade 3 probably will be much better), but that's the way it is now. Cheers, J.V. ____________________________________________________ Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |
From: <ga...@cw...> - 2005-05-28 20:35:37
|
2005-05-28, szo keltez=C3=A9ssel 13.25-kor Keith Irwin ezt =C3=ADrta: > I think the method needs to be void: >=20 > public void on_button1_clicked() { > System.out.println("clicked"); > } >=20 > If you check out the tutorial on the java-gnome site, I think it > explicitly says this somewhere. you are right, but it does not make any difference, either :-((. cheers gaboro |
From: Keith I. <ke...@ke...> - 2005-05-28 20:25:24
|
I think the method needs to be void: public void on_button1_clicked() { System.out.println("clicked"); } If you check out the tutorial on the java-gnome site, I think it explicitly says this somewhere. -K On Sat, 2005-05-28 at 22:16 +0200, Oláh Gábor wrote: > hiya, > > 2005-05-27, p keltezéssel 18.51-kor Jeff Morgan ezt írta: > > On 5/27/05, Oláh Gábor <ga...@cw...> wrote: > > > the error says: > > > java.lang.reflect.InvocationTargetException: ListenerDelegate.create > > > failure > > > > The problem here is that you have defined a callback > > (on_button_execute_clicked) but this method doesn't exist > > in your example. This is not a Java-GNOME bug. If you > > add this method you will see that it works fine. > thanks for the comment, but defining the method does no difference - i > get the same error... > > short example: > > package org.testing; > import java.io.FileNotFoundException; > import java.io.IOException; > import org.gnu.glade.GladeXMLException; > import org.gnu.glade.LibGlade; > import org.gnu.gtk.Gtk; > > public class HotplugManager { > > LibGlade glade; > > public HotplugManager() throws GladeXMLException, > FileNotFoundException, > IOException { > glade = new LibGlade("test.glade", this); > } > > public int on_button1_clicked() { > System.out.println("pressed"); > return 0; > } > > public static void main(String[] args) { > > HotplugManager hotplugman; > > Gtk.init(args); > try { > hotplugman = new HotplugManager(); > } catch(Exception e) { > e.printStackTrace(); > } > Gtk.main(); > > } > } > > test.glade: > > <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> > <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> > > <glade-interface> > > <widget class="GtkWindow" id="window1"> > <property name="visible">True</property> > <property name="title" translatable="yes">window1</property> > <property name="type">GTK_WINDOW_TOPLEVEL</property> > <property name="window_position">GTK_WIN_POS_NONE</property> > <property name="modal">False</property> > <property name="resizable">True</property> > <property name="destroy_with_parent">False</property> > <property name="decorated">True</property> > <property name="skip_taskbar_hint">False</property> > <property name="skip_pager_hint">False</property> > <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> > <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> > <property name="focus_on_map">True</property> > > <child> > <widget class="GtkVBox" id="vbox1"> > <property name="visible">True</property> > <property name="homogeneous">False</property> > <property name="spacing">0</property> > > <child> > <widget class="GtkButton" id="button1"> > <property name="visible">True</property> > <property name="can_focus">True</property> > <property name="label" translatable="yes">button</property> > <property name="use_underline">True</property> > <property name="relief">GTK_RELIEF_NORMAL</property> > <property name="focus_on_click">True</property> > <signal name="clicked" handler="on_button1_clicked" > last_modification_time="Fri, 27 May 2005 20:51:54 GMT"/> > </widget> > <packing> > <property name="padding">0</property> > <property name="expand">False</property> > <property name="fill">False</property> > </packing> > </child> > </widget> > </child> > </widget> > > </glade-interface> > > > cheers > gaboro > > > > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |
From: <ga...@cw...> - 2005-05-28 20:16:57
|
hiya, 2005-05-27, p keltez=C3=A9ssel 18.51-kor Jeff Morgan ezt =C3=ADrta: > On 5/27/05, Ol=C3=A1h G=C3=A1bor <ga...@cw...> wrote: > > the error says: > > java.lang.reflect.InvocationTargetException: ListenerDelegate.create > > failure >=20 > The problem here is that you have defined a callback=20 > (on_button_execute_clicked) but this method doesn't exist > in your example. This is not a Java-GNOME bug. If you > add this method you will see that it works fine. thanks for the comment, but defining the method does no difference - i get the same error... short example:=20 package org.testing; import java.io.FileNotFoundException; import java.io.IOException; import org.gnu.glade.GladeXMLException; import org.gnu.glade.LibGlade; import org.gnu.gtk.Gtk; public class HotplugManager { LibGlade glade; =09 public HotplugManager() throws GladeXMLException, =20 FileNotFoundException,=20 IOException { glade =3D new LibGlade("test.glade", this); } =09 public int on_button1_clicked() { System.out.println("pressed"); return 0; }=09 =09 public static void main(String[] args) { =09 HotplugManager hotplugman;=09 =09 Gtk.init(args); try { hotplugman =3D new HotplugManager(); } catch(Exception e) { e.printStackTrace(); } Gtk.main(); =09 } } test.glade:=20 <?xml version=3D"1.0" standalone=3D"no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> <widget class=3D"GtkWindow" id=3D"window1"> <property name=3D"visible">True</property> <property name=3D"title" translatable=3D"yes">window1</property> <property name=3D"type">GTK_WINDOW_TOPLEVEL</property> <property name=3D"window_position">GTK_WIN_POS_NONE</property> <property name=3D"modal">False</property> <property name=3D"resizable">True</property> <property name=3D"destroy_with_parent">False</property> <property name=3D"decorated">True</property> <property name=3D"skip_taskbar_hint">False</property> <property name=3D"skip_pager_hint">False</property> <property name=3D"type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name=3D"gravity">GDK_GRAVITY_NORTH_WEST</property> <property name=3D"focus_on_map">True</property> <child> <widget class=3D"GtkVBox" id=3D"vbox1"> <property name=3D"visible">True</property> <property name=3D"homogeneous">False</property> <property name=3D"spacing">0</property> <child> <widget class=3D"GtkButton" id=3D"button1"> <property name=3D"visible">True</property> <property name=3D"can_focus">True</property> <property name=3D"label" translatable=3D"yes">button</property> <property name=3D"use_underline">True</property> <property name=3D"relief">GTK_RELIEF_NORMAL</property> <property name=3D"focus_on_click">True</property> <signal name=3D"clicked" handler=3D"on_button1_clicked" last_modification_time=3D"Fri, 27 May 2005 20:51:54 GMT"/> </widget> <packing> <property name=3D"padding">0</property> <property name=3D"expand">False</property> <property name=3D"fill">False</property> </packing> </child> </widget> </child> </widget> </glade-interface> cheers gaboro |
From: Tomasz M. <tmi...@co...> - 2005-05-28 19:16:14
|
Hi I'm still lerning java-gnome together with glade capabilities so i encountered a issue that I can't solve. Is there w way to build a window inside glade editor ant then use this window as my own widget inside other windows (ie; in other VBox)? Or how can I achieve this functionality with java-gnome/glade? In SWT for instance there this concept of Shells Where toplevel window is a shell and any container is a Shell including top level window in another container is straightforward. Any help as always is appreciated. -- t.m. Tomasz Mielnik |
From: Tomasz M. <tmi...@co...> - 2005-05-28 19:00:43
|
Dnia 27-05-2005, pią o godzinie 18:51 -0400, Jeff Morgan napisał(a): > ailure > > The problem here is that you have defined a callback > (on_button_execute_clicked) but this method doesn't exist > in your example. This is not a Java-GNOME bug. If you > add this method you will see that it works fine. i'm new to java-gnome and I had the same problem. so forgive me my (maybe lame) question but where this method should be implemented? in which class? -- t.m. Tomasz Mielnik |
From: Neil J. P. <njp...@gm...> - 2005-05-28 13:02:22
|
Hi, I was inspired by an OSNews article yester which pointed out developing gnome apps with java. I follwed the examples and all worked fine (with a little tweaking), the question i have is that a very simple application compiled with gcj takes up quite a lot of memory: Total : 55.1 MB RSS : 22.1 MB Shared : 16.3 MB I just wanted to now if this is normal, and/if there are any option when compiling that can help. Using FC4T3 java packages, the gcj commands were: gcj --classpath=/usr/share/java/gtk2.6.jar:/usr/share/java/gnome2.10.jar \:/usr/share/java/glade2.10.jar -l gtkjava -l gnomejava -l gladejava -o ExampleGNOME --main=ExampleGNOME ExampleGNOME.java gcj = 4.0.0-8 gtk-java = 2.6.2-3 gnome-java = 2.10.1-3 glade-java = 2.10.1-5 attached the source of the small program. Thanks, -- Neil J. Patel <njp...@gm...> |
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 |
From: Jeff M. <ku...@gm...> - 2005-05-27 22:51:09
|
On 5/27/05, Ol=E1h G=E1bor <ga...@cw...> wrote: > the error says: > java.lang.reflect.InvocationTargetException: ListenerDelegate.create > failure The problem here is that you have defined a callback=20 (on_button_execute_clicked) but this method doesn't exist in your example. This is not a Java-GNOME bug. If you add this method you will see that it works fine. >=20 > i receive this with sun's javavm 1.5 and gij-4, and i receive this for > each signal i have defined... >=20 > anyway, i am on ubuntu hoary, versions libgtk2-java/libglade-java: > 2.8.3-2 >=20 > Sourcecode: >=20 > public class HotplugManager { >=20 > LibGlade glade; >=20 > public HotplugManager() throws GladeXMLException, > FileNotFoundException, > IOException { > glade =3D new LibGlade("data/hotplugmanager.glade", this)= ; > } >=20 > public static void main(String[] args) { >=20 > HotplugManager hotplugman; >=20 > Gtk.init(args); > try { > hotplugman =3D new HotplugManager(); > } catch(Exception e) { > e.printStackTrace(); > } > Gtk.main(); >=20 > } > } >=20 > as you can see, i am not trying to catch the signal it is only defined > in the glade file: > <widget class=3D"GtkButton" id=3D"button_execute"> > <property name=3D"visible">True</property> > <property name=3D"can_default">True</property> > <property name=3D"can_focus">True</property> > <property name=3D"label">gtk-execute</property> > <property name=3D"use_stock">True</property> > <property name=3D"relief">GTK_RELIEF_NORMAL</property> > <property name=3D"focus_on_click">True</property> > <signal name=3D"clicked" handler=3D"on_button_execute_c= licked" > last_modification_time=3D"Fri, 27 May 2005 20:56:57 GMT"/> > </widget> >=20 > does anyone have any ideas? > thanks in advance > cheers > gaboro >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q22= 005 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer >=20 --=20 Jeffrey Morgan "The highest reward for a man's toil is not what he gets for it, but what he becomes by it" - Jon Ruskin |
From: Keith I. <ke...@ke...> - 2005-05-27 21:20:00
|
On Fri, 2005-05-27 at 22:58 +0200, Ol=C3=A1h G=C3=A1bor wrote: > hiya, > 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. Do you think it's related to: http://bugzilla.gnome.org/show_bug.cgi?id=3D305620 which I posted today? Seems that only some of the signals have the problem, or is it all of them in your experience? Keith > the error says: > java.lang.reflect.InvocationTargetException: ListenerDelegate.create > failure >=20 > i receive this with sun's javavm 1.5 and gij-4, and i receive this for > each signal i have defined... >=20 > anyway, i am on ubuntu hoary, versions libgtk2-java/libglade-java: > 2.8.3-2 >=20 > Sourcecode: >=20 > public class HotplugManager { >=20 > LibGlade glade; > =09 > public HotplugManager() throws GladeXMLException,=20 > FileNotFoundException,=20 > IOException { > glade =3D new LibGlade("data/hotplugmanager.glade", this); > } > =09 > public static void main(String[] args) { > =09 > HotplugManager hotplugman; > =09 > Gtk.init(args); > try { > hotplugman =3D new HotplugManager(); > } catch(Exception e) { > e.printStackTrace(); > } > Gtk.main(); > =09 > } > } >=20 > as you can see, i am not trying to catch the signal it is only defined > in the glade file:=20 > <widget class=3D"GtkButton" id=3D"button_execute"> > <property name=3D"visible">True</property> > <property name=3D"can_default">True</property> > <property name=3D"can_focus">True</property> > <property name=3D"label">gtk-execute</property> > <property name=3D"use_stock">True</property> > <property name=3D"relief">GTK_RELIEF_NORMAL</property> > <property name=3D"focus_on_click">True</property> > <signal name=3D"clicked" handler=3D"on_button_execute_clicked" > last_modification_time=3D"Fri, 27 May 2005 20:56:57 GMT"/> > </widget> >=20 > does anyone have any ideas?=20 > thanks in advance > cheers > gaboro >=20 >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by Yahoo. > Introducing Yahoo! Search Developer Network - Create apps using Yahoo! > Search APIs Find out how you can build Yahoo! directly into your own > Applications - visit http://developer.yahoo.net/?fr=3Doffad-ysdn-ostg-q= 22005 > _______________________________________________ > java-gnome-developer mailing list > jav...@li... > https://lists.sourceforge.net/lists/listinfo/java-gnome-developer |
From: <ga...@cw...> - 2005-05-27 20:58:54
|
hiya, 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. the error says: java.lang.reflect.InvocationTargetException: ListenerDelegate.create failure i receive this with sun's javavm 1.5 and gij-4, and i receive this for each signal i have defined... anyway, i am on ubuntu hoary, versions libgtk2-java/libglade-java: 2.8.3-2 Sourcecode: public class HotplugManager { LibGlade glade; public HotplugManager() throws GladeXMLException, FileNotFoundException, IOException { glade = new LibGlade("data/hotplugmanager.glade", this); } public static void main(String[] args) { HotplugManager hotplugman; Gtk.init(args); try { hotplugman = new HotplugManager(); } catch(Exception e) { e.printStackTrace(); } Gtk.main(); } } as you can see, i am not trying to catch the signal it is only defined in the glade file: <widget class="GtkButton" id="button_execute"> <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> <property name="label">gtk-execute</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> <signal name="clicked" handler="on_button_execute_clicked" last_modification_time="Fri, 27 May 2005 20:56:57 GMT"/> </widget> does anyone have any ideas? thanks in advance cheers gaboro |
From: Ralph H. <ra...@gm...> - 2005-05-27 06:15:46
|
Am Freitag, den 27.05.2005, 02:29 -0300 schrieb Arx Henrique: > try this: > > or better, put in button.addlisntener this > > button1.addListener(new ControlExample()); > > you dont need getControl method > Hello Arx, Ok, this works, It was very distressing for me :( Thanx. I'm sure the next Problem will come. Ralph -- Ralph Henneberger <ra...@gm...> |
From: Arx H. <ar...@gm...> - 2005-05-27 05:29:59
|
try this: or better, put in button.addlisntener this button1.addListener(new ControlExample()); you dont need getControl method > package presentation.programm; > import org.gnu.gtk.*; > import org.gnu.glade.*; > import org.gnu.gnome.Program; > import control.ControlExample; >=20 >=20 > public class Example{ > Button button; > ControlExample control =3D new ControlExample(); >=20 > public Example() { > try { > LibGlade glade =3D new LibGlade("glade/2.glade", = this); > button =3D (Button) glade.getWidget("button1"); > } catch (Exception e) { > } > button.addListener(getControl()); > } > public ControlExample getControl(){ > return this.control; > } > public static void main(String[] args) { > Program.initGnomeUI("Hello", "0.1", args); > new Example(); > Gtk.main(); > } > } >=20 > -------------- End Example.java -------------------- |
From: Ralph H. <ra...@gm...> - 2005-05-27 05:10:37
|
Hi, sorry for my bad english! I have a problem with this little program. I will split the program into and control Class. I have create a litlle gui with glade. When i start the program i become an Exception, dont understand this... :( Exception in thread "main" java.lang.NullPointerException at org.gnu.gtk.Button.fireButtonEvent(Button.java:293) at org.gnu.gtk.Button.handleEnter(Button.java:307) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at presentation.programm.Example.main(Example.java:26) Exception in thread "main" java.lang.NullPointerException at org.gnu.gtk.Button.fireButtonEvent(Button.java:293) at org.gnu.gtk.Button.handleLeave(Button.java:311) at org.gnu.gtk.Gtk.gtk_main(Native Method) at org.gnu.gtk.Gtk.main(Gtk.java:55) at presentation.programm.Example.main(Example.java:26) This Exception come when i move the mouse over the button. Greets Ralph Oh, thanks for the TreeView Guide. This was very helpful for me!!! -------------- Example.java -------------------- package presentation.programm; import org.gnu.gtk.*; import org.gnu.glade.*; import org.gnu.gnome.Program; import control.ControlExample; public class Example{ Button button; ControlExample control; public Example() { try { LibGlade glade = new LibGlade("glade/2.glade", this); button = (Button) glade.getWidget("button1"); } catch (Exception e) { } button.addListener(getControl()); } public ControlExample getControl(){ return control; } public static void main(String[] args) { Program.initGnomeUI("Hello", "0.1", args); new Example(); Gtk.main(); } } -------------- End Example.java -------------------- -------------- ControlExample.java -------------------- package control; import org.gnu.gtk.event.*; public class ControlExample implements ButtonListener { public ControlExample() { } public void buttonEvent(ButtonEvent event) { System.out.println("Hello"); } } -------------- End ControlExample.java -------------------- -------------- 2.glade -------------------- <?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> <!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> <glade-interface> <requires lib="gnome"/> <widget class="GtkWindow" id="window1"> <property name="visible">True</property> <property name="title" translatable="yes">window1</property> <property name="type">GTK_WINDOW_TOPLEVEL</property> <property name="window_position">GTK_WIN_POS_NONE</property> <property name="modal">False</property> <property name="resizable">True</property> <property name="destroy_with_parent">False</property> <property name="decorated">True</property> <property name="skip_taskbar_hint">False</property> <property name="skip_pager_hint">False</property> <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property> <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> <child> <widget class="GtkButton" id="button1"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label">gnome-stock-about</property> <property name="use_stock">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">False</property> </widget> </child> </widget> </glade-interface> -------------- End 2.glade -------------------- -- Ralph Henneberger <ra...@gm...> |
From: Nicholas R. <ni...@mn...> - 2005-05-24 10:52:34
|
There seems to be several problems with compiling natively on windows: 1. The WindowsCompilation page (which I wrote :-) says to run configure with the --without-gcj-compile option. This makes the build process skip the building of the libgtkjava library. This library is needed however if you want to compile natively with GCJ. On linux, having configured and make'd without the --without-gcj-compile option, i am able to natively compile using this command: % cd doc/examples/TestTree % gcj --classpath=/usr/local/jg-2.10/share/java/gtk2.6.jar --main=TestTree.TestTree -L/usr/local/jg-2.10/lib -lgtkjava -o TestTree TestTree.java (NOTE: i also configured using the --prefix=/usr/local/jg-2.10 option.) So, it should be the same process under windows (run configure without the --without-gcj-compile option; use the gcj line above). However there are other problems. :-) 2. The configure script will not work if you don't use the --without-gcj-compile option due to a bug in the gcj detection macros we use. I patched my version to fix the gcj detection under windows, but still have not been able to create a native executable under windows. I am going to dig deeper here as i think there are some other issues related to the gcj build process under windows, which prevents the correct creation of the libgtkjava.so library. I'll let you know once i find out more. Cheers, Nick On Mon, 2005-05-23 at 20:17 +0200, llanero wrote: > 2005/5/23, Joao Victor <jvi...@ya...>: > > Are you able to run the example program, like it is said in the WindowsCompilation? (i mean, just > > run, without compiling it natively/statically). I'm asking that so we can narrow the problem. > > Yes, the examples work great, see below. I also can compile run > applications from eclipse. > > I also tried: > > $ ld -l gtkjar2.6 > c:\minGW\bin\ld.exe: cannot find -lgtkjar2.6 > > $ ld -l gtkjava > c:\minGW\bin\ld.exe: cannot find -lgtkjava > > Running the examples: > > /usr/local/src/libgtk-java-2.6.2/doc/examples > $ ./runExample.sh testgtk/TestGTK > Java-Gnome Example Application Launcher > > Checking for jvm and compiler availability... > gcj and gij - appear to be ok > > You are using Open Source java > virtual machine and compiler: this is so good! > > Checking if library paths exist... > /usr/local/lib - appears to be ok > > Testing JAR archives... > /usr/local/share/java/gtk2.6-2.6.2.jar - appears to be ok > > Compilation successful > Application successfully terminated > > > > > |
From: llanero <ll...@gm...> - 2005-05-23 18:17:48
|
2005/5/23, Joao Victor <jvi...@ya...>: > Are you able to run the example program, like it is said in the WindowsCo= mpilation? (i mean, just > run, without compiling it natively/statically). I'm asking that so we can= narrow the problem. Yes, the examples work great, see below. I also can compile run applications from eclipse. I also tried: $ ld -l gtkjar2.6 c:\minGW\bin\ld.exe: cannot find -lgtkjar2.6 $ ld -l gtkjava =20 c:\minGW\bin\ld.exe: cannot find -lgtkjava Running the examples: /usr/local/src/libgtk-java-2.6.2/doc/examples $ ./runExample.sh testgtk/TestGTK Java-Gnome Example Application Launcher Checking for jvm and compiler availability... gcj and gij - appear to be ok You are using Open Source java virtual machine and compiler: this is so good! Checking if library paths exist... /usr/local/lib - appears to be ok Testing JAR archives... /usr/local/share/java/gtk2.6-2.6.2.jar - appears to be ok Compilation successful Application successfully terminated --=20 Manel Clos ll...@gm... http://www.webpersonal.net/llanero/ |
From: Joao V. <jvi...@ya...> - 2005-05-23 17:16:03
|
--- llanero <ll...@gm...> escreveu: > I have the environment built using the WindowsCompilation wiki page. I > tried with -lgtkjava and -lgtkjava2.6. No luck. > Are you able to run the example program, like it is said in the WindowsCompilation? (i mean, just run, without compiling it natively/statically). I'm asking that so we can narrow the problem. Arx and Jeff, do you have any suggestions? (i still haven't tried running JG on Windows). Cheers, J.V. ____________________________________________________Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br |
From: llanero <ll...@gm...> - 2005-05-23 05:10:00
|
I have the environment built using the WindowsCompilation wiki page. I tried with -lgtkjava and -lgtkjava2.6. No luck. Anyone with the same environment? 2005/5/22, Lamex <la...@sa...>: > answer: -lgtkjava --=20 Manel Clos ll...@gm... http://www.webpersonal.net/llanero/ |
From: Tom T. <tr...@re...> - 2005-05-22 21:53:02
|
>>>>> "Tomasz" == Tomasz Mielnik <tmi...@co...> writes: Tomasz> 1. Is it possible to use java collections (like Vector, Hashtable, etc) Tomasz> with java-gtk/java-gnome. I ask bcoz i saw that gtk/glib is using it's Tomasz> own list/maps implementation? This roused my curiosity and I looked at org.gnu.glib.List and org.gnu.glib.GListString. Would it be useful for these to implement java.util.List? Besides being more java-like, in 1.5 it would mean you could use one as an argument to the new foreach construct. Tomasz> 5. Did someone tried to use jakarta subprojects inside GTK app(commoncs Tomasz> for instance) and compile them with gcj? I haven't, but I don't think you'll have any real trouble doing this. FWIW Eclipse uses gtk (not via java-gnome though) and several things from the ASF (ant, tomcat, lucene at least) without problems. If you run FC4, a some of this stuff is already gcj-compiled in the distro. Tom |