Buttons

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
RJStriplin
Posts: 3
Joined: Sat Feb 20, 2016 11:27 pm

Buttons

Post by RJStriplin » Sat Feb 20, 2016 11:34 pm

Hello, i was not sure where to post this, but i have a question about coding in livecode. Is there away to make a button affect a container on a different card.
for example:
Mouse up
put "Hello" into Container "hi"
end Mouse Up"

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Buttons

Post by FourthWorld » Sat Feb 20, 2016 11:41 pm

RJStriplin wrote:Hello, i was not sure where to post this, but i have a question about coding in livecode. Is there away to make a button affect a container on a different card.
for example:
Mouse up
put "Hello" into Container "hi"
end Mouse Up"
Yes, just include the card reference as part of the field object specifier, e.g.:

Code: Select all

put "Hello" into field "hi" of cd "SomeOtherCard"
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

RJStriplin
Posts: 3
Joined: Sat Feb 20, 2016 11:27 pm

Re: Buttons

Post by RJStriplin » Sat Feb 20, 2016 11:51 pm

FourthWorld wrote:
RJStriplin wrote:Hello, i was not sure where to post this, but i have a question about coding in livecode. Is there away to make a button affect a container on a different card.
for example:
Mouse up
put "Hello" into Container "hi"
end Mouse Up"
Yes, just include the card reference as part of the field object specifier, e.g.:

Code: Select all

put "Hello" into field "hi" of cd "SomeOtherCard"
I thought it might be something like this, but i was unclear how to go about doing it.
Thank you so much for your help.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10052
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Buttons

Post by FourthWorld » Sun Feb 21, 2016 12:29 am

Happy to be of service.

If you need to you can even get and put data in fields of other stacks:

Code: Select all

put "hello" into field "somefield" of cd 1 of stack "someotherstack"
LiveCode is very flexible.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Buttons

Post by Klaus » Sun Feb 21, 2016 10:14 am

Hi RJStriplin,

1. welcome to the forum! :D

2. Please check these stacks to understand the basics of Livecode:
http://www.hyperactivesw.com/revscriptc ... ences.html


Best

Klaus

Post Reply