Page 1 of 1

Buttons

Posted: Sat Feb 20, 2016 11:34 pm
by RJStriplin
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"

Re: Buttons

Posted: Sat Feb 20, 2016 11:41 pm
by FourthWorld
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"

Re: Buttons

Posted: Sat Feb 20, 2016 11:51 pm
by RJStriplin
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.

Re: Buttons

Posted: Sun Feb 21, 2016 12:29 am
by FourthWorld
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.

Re: Buttons

Posted: Sun Feb 21, 2016 10:14 am
by Klaus
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