Rich Lague wrote:
If I run the following script from a button that is on the stack I'm working with it works. However, if I try to run it from a button on a palette it does not work. The stack I'm trying to work on is the topstack, right under the palette.

Why?
---------------------------------------------------------------

on mouseUp
  set the name of this card to the selectedText
  put the selectedText into field "resultFld"
end mouseUp

Since the script is in the palette, "this card" refers to the card in the palette. You can shift the focus to the topstack using the defaultStack, which governs how relative object references are interepreted by default:


on mouseUp
  set the defaultStack to the topStack
  set the name of this cd to the selectedText
  put the selectedText into fld "resultFld"
end mouseUp


-- Richard Gaskin Fourth World Media Corporation ___________________________________________________________ [EMAIL PROTECTED] http://www.FourthWorld.com _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to