On 2023-10-25 15:41, Craig Newman via use-livecode wrote:
Paul.

The construction "answer this card of stack “X” does not work if you are not on stack “X”:

answer the  currentCard of stack  “X”  —works

answer the name of this card of stack “X —works

answer this card of stack “X”—Nope

'this card of this stack' is an object reference - when evaluated in contexts which don't expect an object reference, object references return the *content* of the object, or an error (if the object has no content)... Only buttons and fields have content - in which case evaluating them returns the 'text' of the object.

Most things *don't* expect an object reference - places that do are where an object needs to be acted on, rather than a value being needed.

For example:

  set the X of <object-reference>
  put exists(<object-reference>)
  put there is an <object-reference>
  answer <string>

Warmest Regards,

Mark.

--
Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/
LiveCode: Build Amazing Things

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to