[xwt-users] Is there a way to clone a box?
Jeff Buhrt <[email protected]> Sat, 13 Dec 2003 11:35:47 -0500
| Newsgroups | gmane.comp.java.xwt.users |
|---|---|
| Message-ID | <[email protected]> |
Is there any way to java-like clone a box in Lithium?
In Lithium given:
<box id="temp">
<box text="blah" ... />
<textfield ... />
<button ... />
...
</box>
Is there a way to then (Java-like) clone each/any of those children boxes?
so:
var copy = xwt.newBox();
copy.<clone>($temp[N]); // where N=0,1,or 2...
I can manually copy the properties, but how do I make 'copy' be a box,
textfield, button?
[And/or how do I find the template that was applied?]
Right now the widgets seem very crudely to: just have a constructor for
each member (Charlie's table demo), put the boxes into a template file
(most), or I could just construct an XML stream and keep re-decoding it
each time I need a clone. [The above $temp might be a dynamically
constructed 'template' that I need to have copies of and might not be
stored on the disk.]
Ideas?
Thanks,
-Jeff
Jeff Buhrt
Achievement Focused Technology, Inc.
[email protected]
http://aftinc.net
317-513-3238