How do I clone an embedded stack?

stephen barncard stephenREVOLUTION2 at barncard.com
Sun Jan 8 00:46:01 EST 2012


I did this for fonts, and somewhere I have code that creates a new prefs
stack.

Here's the one for fonts.  Same idea. Not really 'cloning' but 'storing the
file conveniently. Thanks to Ken Ray for this.

ON suckUp pFilePath
       -- this puts a binary file into a custom property set for fonts
       put long name of stack "chateau" into tStackForImbedding
       IF pFilePath is empty
       THEN
              answer file "Choose a font to embed:"
              IF it is empty THEN exit to top
              put it into pFilePath
       END IF

       set itemdel to "/"
       put last item of pFilePath into tShortFileName
       set the uFONTBins[tShortFileName] of tStackForImbedding to URL
("binfile:" & pFilePath)
END suckUp

ON spitOut pFolderPath
       -- used to put out binaries from a custom property
       IF pFolderPath is empty
       THEN
              answer folder "Folder to store font:"
              IF it is empty THEN exit to top
       END IF

       put the uFileName of this card into tFileName
       put pFolderPath &"/"& tFileName into tFilePath

       put the uEmbeddedFile of this card into URL ("binfile:" & tFilePath)
END spitOut

On 7 January 2012 20:59, Bill Vlahos <bvlahos at mac.com> wrote:

> I know how to clone a stack that exists on disk:
>      clone stack ("path to file on disk")
>
> I want to embed the stack in a custom property of the main stack and clone
> it from there. Lets say the stack name is "template.rev" and I add it to
> the uTemplate of this stack.
>
> What would be the clone command syntax for this?
>
> Thanks,
> Bill Vlahos
> _________________
> InfoWallet (http://www.infowallet.com) is about keeping your important
> life information with you, accessible, and secure.
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 



Stephen Barncard
San Francisco Ca. USA

more about sqb  <http://www.google.com/profiles/sbarncar>



More information about the use-livecode mailing list