destroyStack, was: Stack Switching Question

Robert Brenstein rjb at robelko.com
Thu Oct 6 11:39:22 EDT 2005


>>
>>Sounds good to me, Paul, but you need to accommodate closing stack 
>>window as opposed to closing stack. We have now:
>>
>>close with destroyStack off = close stack window
>>close with destroyStack on = close stack window, remove stack from memory
>>
>>We still need to be able to do the former. Hide stack comes to mind 
>>as a solution, of course, but making a stack as invisible is now 
>>subtly different than closing it without removal from memory.
>
>If I understand Paul's suggestion correctly, I believe that's 
>covered under his request for a "load" command.
>
>His thinking is not unlike something we all go through learning Rev: 
>in any other app closing a window ultimately purges the data 
>presented in it from memory.

I am not sure that it is covered. Unless you mean than when I open a 
stack, then I have to close it, then load to have it in memory again? 
That would be too much ado. I am referring to a case when I open (not 
load) a stack and then close it but want to keep it in memory since I 
plan to reuse it (possibly re-show to user).

I think that ambiguity arises, at least partially, from having stack 
and window being more or less synonyms, although they are not really 
quite the same.

>As much as I like (and often rely on) the current stay-resident 
>behavior I wouldn't mind if it were optional, with the default being 
>the more intuitive purge.
>
>Of course backward compatibility is a whole other issue, so at best 
>we might hope for some global flag to allow the old behavior to be 
>sustained for legacy stacks without requiring an explicit "load".
>
>--
>  Richard Gaskin
>  Managing Editor, revJournal

I am not sure we face and need true change in behavior. I think that 
if the load/purge business is cleared and the destroystack is 
renamed, the open/close stuff can continue to work as it has so far, 
possibly having the destroy set on as default for new stacks. This 
would then affect only people with existing stacks relying on the 
automatic load upon reference and that can be taken care of with a 
simple error message.

Robert



More information about the use-livecode mailing list