Basic Resource Grafting

David Crawshaw <[email protected]> Thu, 4 Dec 2003 11:10:13 +1000
Newsgroups gmane.comp.java.xwt.widgets
Message-ID <[email protected]>
I've brought back some basic resource grafting, that works as such:

Files:
  main.xwt
  demo/
  demo2/test.xwt

main.xwt:

xwt.ui.frame = thisbox;
...
var r = xwt.graft(xwt._, "demo", xwt._.demo2);
var b = xwt.box;
xwt.apply(b, r.demo.test);
xwt.ui.frame = b;

The template that was applied to the box b was actually demo2/test.xwt.

Also note, the resource root has been moved to xwt._. Eventually just 
referencing _.  should also work, but I haven't added that in my patch 
yet.

You can get a binary that does this, functional traps and better box 
rendering at: http://zentus.com/xwt

Patches to cvs at: http://zentus.com/xwt/patches

d