Differentiating a substack from a mainstack

Mark Schonewille m.schonewille at economy-x-talk.com
Wed Nov 20 16:15:53 EST 2013


Hi Pete,

The owner property of a mainstack is empty.

if the owner of the target is empty then
   --> mainstack
else
   --> substack
end if

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

Use Color Converter to convert CMYK, RGB, RAL, XYZ, H.Lab and other 
colour spaces. http://www.color-converter.com

Buy my new book "Programming LiveCode for the Real Beginner" 
http://qery.us/3fi

Fill out this survey please
http://livecodebeginner.economy-x-talk.com/survey/

On 11/20/2013 20:24, Peter Haworth wrote:
> I need to detect whether a newly created stack is a main stack or a
> substack.  I am using an openStack front script handler to try to figure
> this out (have also used a newStack handler) to check the stack name
> against its mainstack property but it appears that when creating a
> substack, its mainstack is set to its own name when the openStack/newStack
> message is sent.
>
> Any thoughts on how to figure out this seemingly simple piece of
> information?
>
> On a related note, the hidden property of both a main and substack is true
> during newStack and openStack, yet the dictionary claims that openStack is
> sent after a stack is visible.
>
>
> Pete
> lcSQL Software <http://www.lcsql.com>





More information about the use-livecode mailing list