More-Save Stack Woes - Could someone PLEASE explain this...

David Burgun dburgun at dsl.pipex.com
Sat Apr 24 08:03:10 EDT 2004


>Hi David,
>
>>Hi,
>>
>>I know I could save the setting somewhere and restore them when 
>>Cancel is pressed, but isn't there another way?
>>I have many hundreds of controls in a large number of dialog boxes 
>>and to save them all manually will be a lot of work.
>>Could I save the whole (sub-)stacks/cards at a time and restore 
>>them when Cancel is pressed?
>>Any tips on doing this would be greatly appreciated!
>
>There have been several hints on this in the original thread...
>
>OK, you don't see your stack as something that could be called 
>"preferences" and thus
>you did not like my first proposal... (To store any prefs-info in 
>the "prefs"-folder of the user...)


I really don't care what it is called! The whole idea was to just use 
what was already written and tested, e.g. the Stack/Card Save/Restore 
feature of RunRev. Others on the list, suggested that I store the 
data outside of the RR Stack/Card mechanism. Well, I understand I can 
do that, but the point is that this is exactly the way I would have 
done it in C/C++! Which is fine too, except that many people on this 
list have said that I should stop thinging like a C programmer and 
look at it from the RunRev point of view, which in my mind - the 
MAJOR - difference between using RR to build a GUI and (say, for Mac) 
CarbonEvents is the fact that RunRev allows the data and the controls 
to be mixed and easilly saved/restored, e.g. the Data, the GUI and 
the Code are all one "unit".

It seems to me that I have 99.99% of the functionality already built 
into RunRev. The only thing that seems to be stopping me saving a 
stack in the way I decribe is the fact that there doesn't seem to be 
a way to tell RunRev to reload a Stack from a file.

Sure, I could loop thru conrtols or whatever, but this is the way I'd 
do it in C/C++. I can do it that way no sweat, but if I do end up 
doing it that way it defeats the purpose of using an evironment like 
RunRev somewhat.

>Actually one could call that stack a "document" and the ideal would 
>probably be, to ask the user
>where he wants to save it, right?!
>
>But to do this you suggested to clone that (main?) stack to be able 
>to save it, since it is part
>of your standalone, which can cause trouble, too...
>
>Someone suggested to make that stack NOT part of the standalone, so 
>you could save that stack...
>But looks like you did not like this idea either...

That is what I have. A Standalone SpashScreen which calls a 
"MainStack" (not a standalone) which calls a "SubStack" which calls 
another SubStack which is the Modal Dialog we are discussing.

I'll look at the stuff you suggested, but it seems like an awful lot 
of work compared to just reloading the sub-stack from disk if 
necessary. A simple command like "purgeStack" would surely do the 
trick?

Cheers
Dave







More information about the use-livecode mailing list