A nasty experience with "the currentcard"

Richard Gaskin ambassador at fourthworld.com
Sat Feb 21 02:39:44 EST 2015

Geoff Canyon wrote:

 > It seems currentcard is undocumented. I don't even know where I
 > came up with it. But it works in general:
 >     put the long id of  the currentcard of the topstack
 > works fine in the message box. It also works in the script of
 > a button -- generally. As it turns out, the above will give an
 > error *if* the button is in a palette stack, but not if it's
 > in a toplevel stack. (at least in 6.7.1 on a mac) I can't really
 > call it a bug since "currentcard" isn't in the dictionary. But
 > it just cost me two hours of my life, so this my primitive
 > yawp of frustration.

I didn't know about "currentCard" so I just tried it - made a two 
stacks, the first opens the second as a palette, and the second has the 
statement shown above in a button's mouseUp handler.  Works as expected.

Also works with "this card".

LC 6.7.2, Ubuntu 14.04

If "currentCard" is undocumented what prompted you to try it?

Does it work with "this card"?

  Richard Gaskin
  Fourth World Systems
  Software Design and Development for Desktop, Mobile, and Web
  Ambassador at FourthWorld.com        http://www.FourthWorld.com

More information about the Use-livecode mailing list