MouseMove - Moving a stack brutally stops when the decoration change

zryip theSlug zryip.theslug at gmail.com
Tue Apr 6 20:16:19 CDT 2010


2010/4/7 Sarah Reichelt <sarah.reichelt at gmail.com>:
>> 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
>
>
> Confirmed - very strange.
>
> The only workaround I can think of is to set the decorations once
> only, in a mouseUp handler, instead of setting them as you move.
>
> Cheers,
> Sarah

Thanks for your answer Sarah 8-)

I create this quick mouseMove handler to simply test the behavior out
of my picker code. This not really that I need to do ;)


That I thought to do with the mouseMove is to give a friendly (I hope)
interface to detach the palette.

The palette waiting for a long click, then a hand cursor appears and
the user can extract the picker by moving it out of the tools palette.
The color picker becomes an independent palette with its own titlebar.
When the user would like to dock the picker in the tool palette, he
moves the picker somewhere inside the tools palette, the picker
titlebar disappear and it is docked to the tools palette.

It seems that all events are lost when the decoration change. It gives
the feelings the picker received a mouseUp handler.

This is the handler that I used to detect the long click on the palette:

local lCounter

command scanForMouseWithin
   if (the mouseLoc is within the rect of btn "MoveMask") then
      if (the mouse is down) then
         add 1 to lCounter

         if ((lCounter = 10) \
                and (the mouseLoc is not within the rect of grp
"ColorPickerGrp")\
         and (there is not a stack "pickerDragControl")) then
            startMovingPicker --C
         end if
      else
         stopMovingPicker --C
      end if
   else
      stopMovingPicker --C
   end if

   send "scanForMouseWithin" to me in 80 milliseconds
end scanForMouseWithin

The handlers to manage this effect are too long for the list.
You can eventually download the picker on my site and have a look to
it. It will be more eloquent that my description, I think.

-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc



More information about the use-livecode mailing list