How To Send Before?

Phil Davis revdev at pdslabs.net
Sun Nov 10 18:54:47 EST 2013


Maybe this in a frontScript handler?


local sMouseDownInProgress = false


before mouseDown
     if sMouseDownInProgress
     then exit to top
     else put true into sMouseDownInProgress

     send "myPreMousedownStuff" to the target in -1.0 seconds
     send "mouseDown" to the target in -0.5 seconds
     send "clearMouseDownFlag" to me in 0 seconds
     exit to top
end mouseDown


command clearMouseDownFlag
     put false into sMouseDownInProgress
end clearMouseDownFlag


This is a guess.
Phil


On 11/10/13, 3:31 PM, Scott Rossi wrote:
> Now that we have the before/after additions to mouse events and chained
> behaviors, how does one send or dispatch "before mouseDown"
>
> In a control's behavior, I have a "before mouseDown" handler that I want
> to trigger from a "before mouseDoubleDown" handler.  But there doesn't
> seem to be any way to send a mouse event in a before state (instead, the
> standard "mouseDown" message gets sent).
>
> Can this be done?
>
> The problem I'm trying to solve is mouseDown not getting sent/trapped when
> a control is repeatedly pressed very quickly.  Using mouseDoubleDown to
> call mouseDown is a way to address this issue, but as I said, there
> doesn't seem to be any way send the mouseDown message "before" the normal
> mouseDown.
>
> Any ideas?
>
> (I tried using Jacque's time machine routine but it keeps sending my stack
> back to the point before I tried to send the before message.)
>
> Thanks & Regards,
>
> Scott Rossi
> Creative Director
> Tactile Media, UX/UI Design
>
>
>
> _______________________________________________
> 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
>

-- 
Phil Davis





More information about the use-livecode mailing list