Save Stack Locally
Jim Ault
JimAultWins at yahoo.com
Sat Dec 9 18:39:53 EST 2006
On 12/9/06 7:58 AM, "Mark Smith" <mark at maseurope.net> wrote:
> Er, from the dictionary:
> Syntax: save stack [as filePath]
> Examples:
> save stack "Targets"
> save this stack as "Backup"
> save stack "Treats" as "/Disk/Folder/File
>
> This works on my system: Rev 2.7.4, Mac OS 10.4.7
> On 8 Dec 2006, at 22:32, Ken Ray wrote:
>
>> On 12/8/06 1:17 PM, "jhonken" <jhonken at webdsp.com> wrote:
>>
>>> --> Saves Stack
>>> save stack URL "http://www.x12.com/x12provider.rev" as
>>> x12provider.rev
>>
>> Although this would be a nice syntax addition to the language:
>>
>> save <stackDescriptor> [{as|to} <filePath>]
I think the disconnect here, is in trying the useage of
save stack URL "http://www.x12.com/x12provider.rev" as " x12provider.rev"
to Rev
put URL ("http://www.x12.com/x12provider.rev") into tempVar
means put the 20K of characters downloaded, which is the stack file content.
whereas form
> save stack "Treats" as "/Disk/Folder/File"
translates to
save stack (URL "http://www.x12.com/x12provider.rev") as "x12provider.rev"
which becomes
save stack ("20K string that *is* the stack...") as "x12provider.rev"
which is not a valid stack name, instead of
save stack ("stackname") as "x12provider.rev"
So to work with it as a stack:
go stack URL "http://www.x12.com/x12provider.rev" --opens the stack
put the short name of this stack into tName
save stack tName as "x12provider.rev"
--which will be located in the defaultFolder
Or to work with it as a file:
put URL ("http://www.x12.com/x12provider.rev") into tempVar
put tempVar into URL "binfile:x12provider.rev"
Or a one-liner
put URL ("http://www.x12.com/x12provider.rev") into URL
"binfile:x12provider.rev"
Jim Ault
Las Vegas
More information about the use-livecode
mailing list