Aborting substack opening from within preOpenStack?

Graham Samuel livfoss at mac.com
Fri Apr 12 15:55:15 EDT 2013


You can't quit just from a substack (the whole app quits), so if you just want a substack to close without the whole app closing, I think the trick is to make sure it isn't running first: I am having lots of problems with this too, and despite advice from Jacque Gay I have not really cracked it. But as an experiment, put a button in a different stack from the one you want to close, with a script that does the close, and I think it will work. If you want something that's fired from within the substack, I think you have to do something like

 send "closeFromOtherStack" to stack "otherStack" in 0

This allows your substack to quiesce and then it will close. I may have got this wrong, but I think it's a pointer. There is not much I can find in the LC documentation about this.

To exactly copy the IDE's ability to close a stack and remove it from memory is far from straightforward, IMHO.

Graham

On 12 Apr 2013, at 20:00, Paul Hibbert wrote:

> Richard, 
> 
> Try changing "close this stack" to "Quit" - it worked for me!
> 
> Paul
> 
> 
> On 2013-04-12, at 9:29 AM, Dr. Hawkins wrote:
> 
>> When some of my substacks are called to open, I need to check that
>> conditions are ready.
>> 
>> so
>> 
>> if badCondition then
>> answer "You can't do this yet because blah blah blah!"
>> close this stack
>> end if
>> 
>> 
>> But this doesn't seem to stop openStack from getting called; I thought it
>> did.
>> 
>> How do I cause the entire stack opening to abort from within preOpenStack?
>> 
>> And on that line, I'm tracking a bug that is messing with opening a card
>> with a datagrid.  Apparently my grey column problem is linked to a livecode
>> supplied script that tries to "set the text of me to empty", but I don't
>> have it cornered yet.  But these seme related.
>> 
>> -- 
>> Dr. Richard E. Hawkins, Esq.
>> (702) 508-8462
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list