Cloning cards

Richard Gaskin ambassador at fourthworld.com
Thu Nov 18 10:01:37 EST 2010


Joe Lewis Wilkins wrote:

 > If we create a standalone with a menu item of "New Form" and
 > then implement it with a handler script in which we do: clone
 > this card, will this create a new card in the Standalone, keeping
 > in mind that this will be done in a sub-stack? Also, with a
 > matching menu item: Delete Form with the same concern.

Good news:  it's easy to do.

Bad news:  ...but not as a substack.

A substack of the stackfile that's been made into an executable won't be 
able to save changes because the OS prevents executables from modifying 
themselves.

So instead all you have to do is what every other app does:  keep any 
stacks that must be saved in a separate stack file.

Sarah Reichelt contributed this excellent tutorial on saving data in 
standalones to the LiveCode Journal site, which many have found very 
helpful for this:

<http://livecodejournal.com/tutorials/saving_data_in_revolution.html>

--
  Richard Gaskin
  Fourth World
  LiveCode training and consulting: http://www.fourthworld.com
  Webzine for LiveCode developers: http://www.LiveCodeJournal.com
  LiveCode Journal blog: http://LiveCodejournal.com/blog.irv



More information about the use-livecode mailing list