Palette redraw problem

Scott Rossi scott at tactilemedia.com
Wed May 19 18:36:32 CDT 2004


Recently, "J. Landman Gay" wrote:

> I have stack that opens a tool palete. I want the palette to disappear
> when the stack is not frontmost, and reappear when it is. I scripted a
> suspendStack handler and a resumeStack handler to manage this:
> 
> on suspendStack
> hide palette "myPalette"
> end suspendStack
> 
> on resumeStack
> show palette "myPalette"
> end resumeStack
> 
> This works exactly every other time the stack is suspended; that is, the
> first time it hides, the second time it doesn't. In addition, the times
> when the palette is reshown, it is not redrawn and appears on screen as
> a plain white rectangle with no contents. "Go this card of stack
> myPalette" from the message box will force a redraw and the contents appear.


So far, I can confirm the above behavior on Mac OSX.

I don't know if this is an acceptable workaround but have you tried setting
the palette's loc offscreen?


local origBR

on suspendStack
  put bottomRight of stack pal into origBR
  set bottomRight of stack pal to 0,0
end suspendStack

on resumeStack
  set bottomRight of stack pal to origBR
end resumeStack


I used this and it seems to work, but I don't know if this is the behavior
you want (you can't click on the palette or it disappears).

Regards,

Scott Rossi
Creative Director
Tactile Media, Development & Design
-----
E: scott at tactilemedia.com
W: http://www.tactilemedia.com



More information about the use-livecode mailing list