Save Data to stack inside Standalone - Broken?

Sivakatirswami katir at hindu.org
Sun May 3 22:50:43 EDT 2009


Jim Bufalini wrote:
> Hi Sivakatirswami,
>
> Don't make the stack part of your standalone build. Rather, go or go
> invisible to the stack from the preOpenStack of the splash stack in your
> standalone. Doing this sets the filename of the stack. Then you can save it.
> When you go to the stack, use a fully qualified path. So, if the stack is in
> the same directory as your standalone, then *go stack (the defaultFolder &
> slash & "lexicon.rev")* Now the stack will have a fileName property and can
> be saved. If it is in subdirectories of the root, just add the subdirectory
> path to the above as in (the defaultFolder & slash &
> "subdirectory/subdirectory/lexicon.rev"). The only thing that can stop a
> save then is user rights to the path.
>
> Aloha from another Island of Hawaii ;-)
>
> Jim Bufalini
>
>   

Aloha, Jim:

You got it! Problem solved:

go stack url "binfile:lexicon.rev" = bogus... I think we did that in 
another project where the stack would not open  properly... can't 
remember why we need to use the url binfile format to  get the stack to 
open.

But, it was doing exactly like downloading from the web...
open in ram but no file name.

This works now...

on loadFromDisk #start up handler
   set itemdel to "/"
   set the defaultfolder to item 1 to -2 of the effective filename of 
this stack  
   --go stack url "binfile:lexicon.rev" #doesn't work
   go stack (the defaultfolder&"/lexicon.rev") # now it will save! hurray...
   hide stack "MahaLexiconLoader"
end loadFromDisk

It's been raining here on Kauai since last October, and only last week 
did it stop.
I was so happy to see dust coming up from the tractor when I went out to 
mow the fields finally!

Cheers

skts




More information about the use-livecode mailing list