MouseMove - Moving a stack brutally stops when the decoration change

zryip theSlug zryip.theslug at
Tue Apr 6 14:01:34 EDT 2010

Hi all,

When I worked on my color picker, I met a behavior that surprised me.

To dock / undock the picker with the RR tools palette I'm using an
mouseMove handler. When the picker palette is inside or outside the
tools palette the titlebar of the picker appears / disappears. For
that, I change the decorations property of the stack.

However the fact to change the decorations of a stack, brutally stops
the move. It seems that the mouseMove handler stops to track correctly
the handler

If you want to test this behavior, simply create a new stack, then
copy this script into the card or the stack script.

local lCounter

on mouseMove
   if (the mouse is down) then
      add 1 to lCounter
      if (lCounter = 10) then
         set the decorations of this stack to empty
         put 0 into lCounter
      else if (lCounter = 1) then
         set the decorations of this stack to default
      end if
      set the loc of this stack to globalLoc(the mouseLoc)
   end if
end mouseMove

I need your opinion. Is it a bug?

Or maybe, do you know a better way to do that?


-Zryip TheSlug- wish you the best! 8)

More information about the Use-livecode mailing list