PDA

View Full Version : Copying an object


thatoneguy
06-06-2007, 10:28 PM
I would like to be able to create a "myWindow" (custom class, just a view, w/ a border, and arbitrary content), and then create copies of it to display when a button is clicked (prototype design pattern). I don't see any generic copy method in the docs for LzView or LzNode. I could create a copy method in my "window" class, but I couldn't copy the arbitrary content. Does anyone know how to copy an object tree?

Avorcor
06-07-2007, 03:58 AM
I haven't done this, but look at LzDataElement.cloneNode. If you get a pointer to the windows as an element, you should be able to do a clone on that node.