getting the "normal" messages when reopening a stack

J. Landman Gay jacque at hyperactivesw.com
Sat Sep 24 21:05:37 EDT 2016


On 9/24/16 4:19 PM, Dr. Hawkins wrote:
> My user interface stacks are now made by cloning the respective stack, to
> allow multiple open debtors, and multiple windows of each type in the
> interface.
>
> I store the stem that identifies tables and windows in the dbtr_stem custom
> property of the stack.
>
> I need to lock messages as I open the stack, as no setup routines even make
> sense until this property exists and is accessible. Once clones, I set that
> property, as well as the name (which depend on that property).  I then
> close the new stack.
>
> Is there a way to send the "normal" messages, such as preopenstack and open
> card when it opens.  I had assumed that closing the stack and reopening
> would cause this to happen, but apparently not.
>
> These are transient stacks; they should never get saved to disk, and are
> deleted as part of the process of closing a debtor.
>

A stack in RAM doesn't get the open* messages because, technically, it's 
already open. If you set the destroystack property to true, then the 
next time it opens the normal messages occur. But in this case that 
would delete your temporary clone, so you can't do that.

You could specifically send the messages after you set up the properties:

-- set up the clone, then:
preOpenStack
openStack

or, depending on your stack organization, you might need to:

send "preOpenStack to me" , etc.

If you will be closing and reopening the stacks multiple times, you 
might trap for "resumeStack" instead.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list