weird standalone save behavior

Richard Lague laguer at ucs.orst.edu
Tue Apr 4 13:31:30 EDT 2006


On Apr 2, 2006, at 11:57 PM, J. Landman Gay wrote:

> 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?

I run the Repair Permissions from Disk Utility at least once a day.  
So, if it is a permissions problem it at least seems to be one that  
is beyond the ability of Disk Utility to fix.

The save fails in the folder where I keep all my Revolution stacks.  
It also fails if I launch Revolution by double clicking on Revolution  
in the top level Application folder and then try to create a  
standalone in a sub-folder within the Applications folder. Usually,  
my standalones will save if I either create them on the DeskTop or  
drag them to the DeskTop. I have a few old stacks that will make  
standalones that will save data in my regular Revolution folder, but  
when dragged to the DeskTop stop saving data.

Thanks,

Rich


More information about the use-livecode mailing list