On Thu, 17 Feb 2011 19:34:40 +0100
Luis Muñoz Villarreal <luis.munoz.villarr...@gmail.com> wrote:

> Hi!
> [snip]
> I don't undestand the reason of this issue.
> Could you help me?
> 
> Best regards

Hey,

I figured out what was wrong. It seems you only need to call parse() on
the top level widget and just use that xml tree for all its children.

=== modified file 'ExampleWithGlade.java'
--- ExampleWithGlade.java	2011-02-19 04:47:45 +0000
+++ ExampleWithGlade.java	2011-02-19 05:00:56 +0000
@@ -6,10 +6,9 @@
 public class ExampleWithGlade {
     public ExampleWithGlade() throws FileNotFoundException {
         XML xmlWin = Glade.parse("rsc/example.glade", "win");
-        XML xmlTreeView = Glade.parse("rsc/example.glade", "treeview");
 
         Window win = (Window) xmlWin.getWidget("win");
-        TreeView treeview = (TreeView) xmlTreeView.getWidget("treeview");
+        TreeView treeview = (TreeView) xmlWin.getWidget("treeview");
 
         DataColumnString placeName = new DataColumnString();
         ListStore model = new ListStore(new DataColumn[] { placeName });

Attachment: signature.asc
Description: PGP signature

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
java-gnome-developer mailing list
java-gnome-developer@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/java-gnome-developer

Reply via email to