Some Basic Misunderstandings/Problems with RunRev - aka Help!

Richard Gaskin ambassador at fourthworld.com
Wed Apr 14 15:09:40 EDT 2004


David Burgun wrote:

>>> Then PLEASE could someone just tell me how I save a Standalone Stack 
>>> PLEASE!!! I've been asking questions about this all day and I'm just 
>>> going round and round and round in circles.
>>
>> He did: executable files on Windows and UNIX cannot modify themselves. 
>> The Mac version of Rev enforces this for consistency.
> 
> Well that's fine and understandable, but it still doesn't tell me how to 
> save a stack when I have made a Standalone! But I still don't see how 
> that answers my question - "Then PLEASE could someone just tell me how I 
> save a Standalone Stack PLEASE!!!".

A standalone is an executable file, and as a matter of computing 
convention executable files cannot modify themselves. Saving changes 
would constitute modifying the file.

In brief: it's not possible.

So the alternative is to separate what you want saved from the 
executable itself, which is pretty much what all other apps do (aside 
from a small handful of older Mac apps).

>> You could, however, use the clone command to clone the stack, using 
>> answer file to set the stack's filename property and then save the clone.
> 
> I don't understand this, why would I have to use the "answer file"
> command?  But given that I don't.

My bad:  I was thinking you wanted to support multiple documents, in 
which case the standard behavior would be to allow the user to assign a 
file name when saving.  Double bad:  I meant "ask file" rather than 
"answer file".

For saving just one stack without regard to future maintenance issues 
(which would benefit from separating data from UI), Björnke said it 
best, worth reposting here:

-------------------------------------
How to save stacks using RunRev standalones:
Normally one can save a stack using the "save" command. But standalones 
generated with RunRev can't save themselves. That means that every stack 
within the application is unable to save itself. So one has to save a 
stack that is not part of the Application. Many developer use a so 
called "Splash screen" approach. The application itself is only a splash 
screen, which then loads all the other stacks from a predefined 
location.  For example like this:

on startup
   hide me
   go stack "Interface.rev"
end startup

for this to work the stack "Interface.rev" just has to be in the same 
directory as the application. As "Interface.rev" is not part of the 
application file, it can be saved without problem. As long as it is not 
on a CD or a write protected location as the application folder of Win 
XP, but that is another problem.
-------------------------------------

-- 
  Richard Gaskin
  Fourth World Media Corporation
  ___________________________________________________________
  Ambassador at FourthWorld.com       http://www.FourthWorld.com


More information about the use-livecode mailing list