palette question
Richard Gaskin
ambassador at fourthworld.com
Mon Sep 6 15:58:38 EDT 2004
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
___________________________________________________________
Ambassador at FourthWorld.com http://www.FourthWorld.com
More information about the use-livecode
mailing list