weird standalone save behavior
Richard Gaskin
ambassador at fourthworld.com
Mon Apr 3 02:24:20 EDT 2006
Richard Lague wrote:
> On Apr 1, 2006, at 12:00 PM, Richard Gaskin wrote:
>> Richard Lague wrote:
>>> In an effort to figure out what is going on I have been using the
>>> following script for saving:
>>> ON mouseUp
>>> save this stack
>>> IF the result is not empty THEN
>>> put the result into resultVar
>>> answer resultVar
>>> ELSE
>>> answer "save confirmed"
>>> END IF
>>> END mouseUp
>>> When I can not save data I always get the same result: “Can’t
>>> open stack file”.
>>
>> Are you sure that in the context it's being called "this stack"
>> refers to the stack you want and not the standalone?
>
> The script is in a button on the sub-stack. I have been testing this
> with a very simple standalone -- a one-card main stack/application
> that has one sub-stack. The sub-stack is also only one card that has
> a "save" button and a text field.
On Windows and UNIX systems, the executable file cannot modify itself.
The Rev engine enforces this on Mac OS for consistency.
If I read your description correctly the substack is part of the
executable stackfile.
If you break that substack out into its own stackfile you will be able
to save it.
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
More information about the use-livecode
mailing list