AW: why don't I get mouse events with brush tool?
Tiemo Hollmann TB
toolbook at kestner.de
Wed Jul 13 03:37:13 EDT 2011
Just FYI
After having run against the front door without success, I now followed
Björnkes approach to recreate the paint tool with a drag loop and here it
was easy to implement my undo function:
on mouseDown
xStoreUndo -- mybackup handler
put the mouseLoc into tOldLoc
choose brush tool
repeat while the mouse is down
wait with messages
drag from tOldLoc to the mouseLoc
put the mouseLoc into tOldLoc
end repeat
choose browse tool
pass mouseDown
end mouseDown
but the question remains. Is it an unimplemented feature to capture the
mouse events also with the paint tools, or is there any deeper sense behind
the sceens not to do it?
Tiemo
> -----Ursprüngliche Nachricht-----
> Von: use-livecode-bounces at lists.runrev.com [mailto:use-livecode-
> bounces at lists.runrev.com] Im Auftrag von Tiemo Hollmann TB
> Gesendet: Dienstag, 12. Juli 2011 11:33
> An: 'How to use LiveCode'
> Betreff: why don't I get mouse events with brush tool?
>
> Hello,
>
> some days ago Björnke taught me that its not a bug but a feature that I
> cant pick the mousecolor while having the brush tool activated.
>
> Now I am experiencing, that I also dont get even a mouseDown or mouseUp
> with the brush tool. The dictionary doesnt says anything about this
> behavior. What I want to do is:
>
> The user can paint with the brush tool on an image. To supply the user an
> undo with several states, I wanted to make a backup of the image each time
> at mouseDown, so that the user can roll back every newly painted state.
>
> I tried to choose the brush tool with mouseEnter and make the backup with
> mouseDown (I dont get the mouseDown event).
>
> I tried to make the backup with mouseDown and choose brush tool afterwards
> (works only once until the brush tool is choosen in the first mouseDown)
>
> I tried to switch back to the browse tool with every mouseUp to make the
> backup with next mouseDown (I dont get the mouseUp event, when having
> selected the brush tool)
>
> Probably I am again too narrow minded and looking into the wrong
direction,
> can anybody point me into another direction, how I can realize my undo
> function?
>
> Thanks
>
> Tiemo
>
>
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list