How to move a "layer" from one "dynamic panel" to another, possibly on another screen?

Dave shared this question 3 years ago
Answered

Without resorting to text-editing files in screens/[gobbledygook].xml, (which, by the way, works brilliantly, if you're aware that a .vp file is a ZIP file and you're XML-capable), how do we move a "layer" from one "dynamic panel" to another, possibly on another screen?

Comments (5)

photo
1

PS: Please allow me to raise a glass (of fresh-squeezed California Orange Juice from my back yard) to whoever it was at Justinmind that decided to store the prototypes as a ZIP file containing (among other things) XML files.


For XML H4X0RZ like me, it's a real blessing to be able to do search-and-replace and other text-editing exercises on the XML files, taking into account the risks that it could completely blow up a prototype if you get it wrong.

photo
1

I'm afraid you can't move a layer between dynamic panels. However you could copy the layer components and paste them on another layer.

photo
1

Thank you, Carles. May I change this to a feature request? Being able to move layers between dynamic panels would be useful.


Until then, I can always resort to editing the XML and moving a "tab" element from one "tabbedbox"element to another. I imagine that the risk involved is the potential for duplication of element IDs?

photo
1

That's for sure, I will add it to our backlog list.


Thanks for the suggestion!

photo
1

Warning!


If someone comes across this post and decides that it would be a good idea to copy a Layer of a Dynamic Panel from one screen to another by editing the XML directly,


DO NOT DO IT.


Duplicate element IDs from the original Layer in the copied Layer are causing new events added to the copied Layer to disappear when I save and re-open my prototype. They appear to work while I'm editing and simulating the prototype (and even re-sharing it to Justinmind), but as soon as I save and re-open it, the new events are deleted.


Consequently, I have several major features of my prototype that do not work because of this.


Please, for the sake of your sanity, don't follow my suggestion!


As a work-around, I hand-edited the IDs of the affected elements in the XML files and now have a working prototype, but I won't be doing this again.