Hi all.
Stuck on something that seems simple but I must be missing something!
I need to get the name of the mainstack from a substack. But can not seem to get the grammar correct.
this code is in the substack on preOpenStack
get the name of the mainStack of me
but it fails. Any help appreciated
Got it! was being silly.
But now i can't reference mainstack from substack
get the cVersion of the mainstack of this stack
Definately got coders block!
Get name of mainstack from substack
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 78
- Joined: Wed Apr 10, 2013 9:08 pm
Get name of mainstack from substack
Last edited by Tribblehunter on Sun Nov 09, 2014 7:11 pm, edited 1 time in total.
Returning to try to learn livecode again.
But much greyer at the temples than the last time.
But much greyer at the temples than the last time.
Re: Get name of mainstack from substack
Hi Tribblehunter,
Get puts a value from an expression into the it variable, so you will have to reference this in your script.
Also, the correct syntax that you are looking for should be the following
-
Kind Regards,
Neil Roger
--
LiveCode Support Team ~ http://www.runrev.com
--
Get puts a value from an expression into the it variable, so you will have to reference this in your script.
Also, the correct syntax that you are looking for should be the following

Code: Select all
on preOpenStack
get the mainstack of me
put it
end preOpenStack
Neil Roger
--
LiveCode Support Team ~ http://www.runrev.com
--
-
- Posts: 78
- Joined: Wed Apr 10, 2013 9:08 pm
Re: Get name of mainstack from substack
Thanks. You gave me the solution and also nudged my brain to get the next solution!
Returning to try to learn livecode again.
But much greyer at the temples than the last time.
But much greyer at the temples than the last time.
Re: Get name of mainstack from substack
another useful one to use is "owner"[*]
Code: Select all
put the owner of me into grpName
answer "The group I am in is "&grpName
Re: Get name of mainstack from substack
Hi,
Sometimes, it isn't practical to get the mainstack of me. In such cases, you can use the long id.
Kind regards,
Mark
Sometimes, it isn't practical to get the mainstack of me. In such cases, you can use the long id.
Code: Select all
put the long id of me into myVar
put "stack" && the last word of myVar into myStack
put the long id of the target into myVar
put "stack" && the last word of myVar into myStack
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode