Page 1 of 1
How to save a stack file in the sandbox era?
Posted: Wed Dec 14, 2016 6:43 pm
by Mag
I'm working on an app for Mac were the user can save a stack file on disk via the ask file dialog of LiveCode.
Code: Select all
ask file "Save This File As:" with the title of stack stackName & ".abc" as sheet -- in a sandboxed app you need that the save as dialog returns a path with the extension, you cannot add it later
Unfortunately, when user deletes the extension in the dialog, then the stack is saved without it, so when you double click the file, the app is not launched.
Re: How to save a stack file in the sandbox era?
Posted: Wed Dec 14, 2016 7:05 pm
by Klaus
Hi Mag,
who is the developer of that app?
Code: Select all
...
ask file "Save This File As:" with the title of stack stackName & ".abc" as sheet
put it into tFile2Save
if char -4 to -1 of tFile2Save <> ".abc" then
put ".abc" after tFile2Save
end if
## Carry on with happy saving here...
...
Best
Klaus
Re: How to save a stack file in the sandbox era?
Posted: Wed Dec 14, 2016 7:20 pm
by Mag
Its me messier!
Thank you for your precious suggestion, I will implement it in the not-sandboxed version.
About the sandboxed version there is a problem: you need that the save as dialog returns a path with the extension, you cannot add it later.

Re: How to save a stack file in the sandbox era?
Posted: Wed Dec 14, 2016 7:28 pm
by Klaus
Oh, sorry, I was not aware of this!?

Re: How to save a stack file in the sandbox era?
Posted: Sat Dec 17, 2016 11:34 am
by Mag
Maybe I could ask for a name first, and then prompt with a save file dialog with the chosen name...