destroyStack, was: Stack Switching Question
simplsol at aol.com
simplsol at aol.com
Thu Oct 6 04:23:10 EDT 2005
Jeanne,
It got 5 of my votes as well.
But I think there is more confusion here.
A
I believe Open Stack and Close Stack should be symmetrical. In other
words, Close Stack should reverse the results of Open Stack. Open Stack
1. loads the stack into memory, 2. makes the stack visible on the
screen, and 3. locks other users out of the stack. Close Stack should
(in opposite order) 1. release the stack to the next user, 2. remove
the stack image from the screen, and 3. purge the stack from memory.
Close Stack should always purge, there should be no "destroyStack" or
"purgeOnClose" option. This would be logical, elegant, consistent,
predictable, simpler, and visible (you would not end up with hidden
stacks in memory that you didn't know were there).
B
In addition to a Purge, or Purge Main Stack command, I'd like to see a
Load Stack command - symmetrical with purge. "Load" is short, describes
the operation, and is already used by Transcript for URLs. Load Stack
would place a copy of a stack in memory (without opening it), Purge
Main Stack would remove it.
C
I believe stacks should only be put into memory by opening or loading
- not by referencing. This would be logical, elegant, consistent,
predictable, simpler, and visible. There is not (and should not be) a
Dereference command! By being forced to load stacks before working on
them we will always be reminded to purge them and we will not have
stacks in memory which we put there unaware.
Let's bury "destroyStack" permanently.
Paul Looney
-----Original Message-----
From: Richard Gaskin <ambassador at fourthworld.com>
To: How to use Revolution <use-revolution at lists.runrev.com>
Sent: Wed, 05 Oct 2005 21:54:10 -0700
Subject: Re: Stack Switching Question
Jeanne A. E. DeVoto wrote:
> At 12:25 AM -0400 10/6/2005, simplsol at aol.com wrote:
>> By "destroyStack" don't we always mean "purge stack"?
> > The delete stack command, when used on a main stack, purges the
stack > from memory. However, when used on a substack, it deletes that
substack > from the stack file. The next time the stack file is saved,
bye-bye > substack.
> > It is... (deep breath)... perhaps not the most well-thought-out
feature > of the language. There is a bugzilla request >
<http://support.runrev.com/bugdatabase/show_bug.cgi?id=1081> to split >
the two functions of the delete stack command.
Good job -- got my vote. Thanks.
> (This is separate from the destroyStack property, which does always
> indicate whether the stack should be purged. Ironic that the more >
alarming name is attached to the less dangerous feature...)
Maybe we should change the syntax "go next card" to "erase hard drive"
for consistency in irrelevant ominousness ;)
--
Richard Gaskin
Managing Editor, revJournal
_______________________________________________________
Rev tips, tutorials and more: http://www.revJournal.com
_______________________________________________
use-revolution mailing list
use-revolution at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list