weird standalone save behavior
J. Landman Gay
jacque at hyperactivesw.com
Mon Apr 3 02:57:40 EDT 2006
Richard Gaskin wrote:
> 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.
I think something else is going on. He wrote to support recently and I
didn't have a clue what the problem might be. I did take a look at his
sample application, and the substack is saved out as a separate file.
When I tested it, it saved fine for me. I understand that Sarah also
tested it for him, and it saves fine for her too. On his own machines,
it saves okay sometimes and not others, and seems to behave differently
depending on whether he has recently copied the files or not, and to
which drive he has copied them.
The idea of it being a permissions problem was mine, because I believe
the "can't open stack file" error is due to the inability of the engine
to create the temporary backup file during the save operation. This only
happens to him sometimes, and only under certain conditions. It seems to
be something specific to his setup, as I haven't ever heard of anything
like this except in cgi-bin folders (which generally have permissions
set to forbid file creation.)
Richard (Lague): did you try running Repair Permissions using the Disk
Utility app? It can't hurt.
Also, when the save fails, is your app located somewhere in your own
user folder? You aren't trying to save a file to another user folder, right?
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list