Getting contents of another stack's field

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Getting contents of another stack's field

Post by Andycal » Tue Sep 04, 2007 1:26 pm

So, I've got a field on stack 1, and I open stack 2. How can stack 2 know what's in the text field on the card in stack 1?

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Tue Sep 04, 2007 1:44 pm

Hi Andycal,

Create two stacks. One with a field and one with a field and a button. Put the following script into the script of the button:

Code: Select all

on mouseUp
  put field 1 of stack "Your First Stack" into field 1
end mouseUp
and click once on the button.

Best,

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

Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Post by Andycal » Tue Sep 04, 2007 2:04 pm

Y'know what, when it comes down to it, this RunRev lark is a bit obvious 'aint it?!

Cheer Mark!

Garrett
Posts: 386
Joined: Sat Apr 08, 2006 8:15 am
Contact:

Post by Garrett » Tue Sep 04, 2007 7:02 pm

Yeah, it's kind of like "*slaps self on forehead* Wow! I should've seen that! It's so simple!" when you realize it. :-)

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

Post by reelstuff » Wed Sep 05, 2007 12:33 pm

I agree, for me its just hard to wrap my mind around how easy it can be, so I work at making it harder :roll:

Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Post by Andycal » Wed Sep 05, 2007 12:58 pm

I think this is a big barrier to most people who are experienced programmers and is a potential problem for the marketing of RunRev.

I would guess that complete newbies to programming will have an easier time using RunRev than seasoned coders. It's programming using English and it breaks the rules in some respects, but makes for super-fast development.

Seasoned programmers are put off by it. I've been programming in PHP for years and before that did a little of C++ and VB and a few scripting languages. RunRev just seemed bizarre to me and to be honest, after buying it I didn't touch it for a year.

Having spent a few weeks recently playing again, it suddenly 'clicked' and within two days I wrote an image re-size utility for our customers and an SMS gateway system. That sort of development just isn't possible in such a short time using other languages.

I'm a convert, big style!

andyh1234
Posts: 476
Joined: Mon Aug 13, 2007 4:44 pm
Contact:

Post by andyh1234 » Thu Sep 06, 2007 1:13 am

Im a convert too now, I had it for a while and didnt really touch it, but after reading Dan Schaffers book, got hooked and have just about finished my first shareware app in it.

Been fighting with VB and C for years, its amazing just how easy things can be, it still amazes me everytime I compile, and the app im writing on my mac just works in windows as well (once I got the fonts figured out!!!)

I cant do that with any other app, Realbasic is the only other one I can think about, but it doesnt make it as easy.

Andy

Post Reply