Problem getting the text of an object on another stack and card

Geoff Canyon gcanyon at inspiredlogic.com
Mon Mar 13 01:12:38 EST 2006


On Mar 12, 2006, at 6:11 PM, Garrett Hylltun wrote:

> The line of code is this:
>
> put the text of varTempObject of card varTempCard of stack  
> varTempStack into varTempResult
>
> varTempStack holds the name of the stack, varTempCard holds the  
> name of the card.  varTempObject holds the type and name of the  
> object, such as:
>
> button "Button1"
>
> So the line of the code in question would look like this:
>
> put the text of button "Button1" of card "MainCard" of stack  
> "MainStack" into varTempResult

I don't believe you can use this syntax. Putting

button "Button1"

into a variable "tButton" and then saying

put the text of tButton of card tCard

won't work.

You can put the name of the button into tButton and then say

put the text of button tButton of card tCard

etc.

Or you can put the full reference into a variable. For example, this  
will work:

put the long id of button "Button1" into tID
put the text of tID

regards,

Geoff



More information about the use-livecode mailing list