Getting palette buttons to work on another stack

JonathanC at ag.nsw.gov.au JonathanC at ag.nsw.gov.au
Tue Mar 2 19:28:02 EST 2004


"Ken Ray" <kray at sonsothunder.com> wrote:
> ... you should be able to do this (but only when the palette's 
> really a palette):
> 
> on mouseUp
>   set the defaultStack to the topStack
>   repeat with i=1 to the number of flds
>     set cursor to busy
>     set lockText of fld i to not (lockText of fld i)
>   end repeat
> end mouseUp

Thanks Ken. I notice that defaultStack is a global variable. Does that 
mean I should set it back to what it was before? Like this:
on mouseUp
  put the defaultStack into saved_value
  set the defaultStack to the topStack
  repeat with i=1 to the number of flds
    set cursor to busy
    set lockText of fld i to not (lockText of fld i)
  end repeat
  set the defaultStack to saved_value
end mouseUp

... or doesn't it matter?

Regards,
Jonathan Cooper
Manager of Information / Website
Art Gallery of New South Wales
Sydney, Australia
http://www.artgallery.nsw.gov.au


More information about the use-livecode mailing list