Find in different stack?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Find in different stack?

Post by thatkeith » Mon Mar 03, 2014 6:02 pm

Is there a straightforward way to find text in a different stack? The 'find' command is really easy to demonstrate, but it's limited to searching through the same stack.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9840
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Find in different stack?

Post by FourthWorld » Mon Mar 03, 2014 6:28 pm

See the defaultStack global property in the Dictionary; setting that to the name of the desired stack before running the find command should do what you need.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

thatkeith
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 346
Joined: Mon Mar 01, 2010 7:13 pm
Location: London, UK
Contact:

Re: Find in different stack?

Post by thatkeith » Mon Mar 03, 2014 7:37 pm

Nice, thanks!
With a little bit of rethinking and being careful to call it just before the actual 'find' line this worked a treat.
Technical Writer, Meta
University Lecturer
Technical Editor, MacUser (1996-2015)
360 VR media specialist

Post Reply

Return to “Talking LiveCode”