Page 1 of 1

Template Card

Posted: Tue Feb 04, 2014 7:30 pm
by marcelloe
In a standalone app I want to have a button that will bring up a template card (fill in the necessary information)and it will create a copy of the template card with the information. Is this possible? I hope you understand what I am trying to do.

Re: Template Card

Posted: Wed Feb 05, 2014 2:09 pm
by LCNeil
Hi Mark,

It is not possible to save a single card as a separate entity, as cards are part of a stack. But it could be possible to save a stack, which would give you the same overal goal.

I would recommend looking into the "clone" command as this allows you to make a copy of objects in LiveCode (stacks included). You should then be able to use the "save" command to save this newly created stack to a given directory with any filled in information. (e.g. a writeable directory on mobile is the "documents" directory")

I hope this gives you some leads.

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--

Re: Template Card

Posted: Wed Feb 05, 2014 2:33 pm
by marcelloe
I just want to make sure I totally understand. I can create a new stack that I want to be copied over and over. This can be done in a standalone app. Does it matter if the stack is a new main stack or sub-stack? Also, will this work on mobile?

Re: Template Card

Posted: Fri Feb 07, 2014 5:21 pm
by LCNeil
Hi Mark,

Yes this should work. The clone command should allow you to "clone" the stack you are working on and then save it. You will need to save this cloned stack to a workable directory on mobile (e.g.documents) and if you clone a stack it will duplicate everything contained within (this includes substacks)

It is essentially giving you a copy of your stack to work with which you can save.

Kind Regards,


Neil Roger
--
RunRev Support Team ~ http://www.runrev.com
--