Mouse messages while down

Jim Ault JimAultWins at yahoo.com
Sun Mar 18 01:17:07 EDT 2007


> On Mar 17, 2007, at 9:22 PM, Stephen Barncard wrote:
> 
>> Sorry Joe, polling is just plain bad practice and could interfere
>> with other messaging code. Rev gives plenty of ways to deal with
>> messages that one should never have to use idle.
>> 
>> You still have your hypercard hat on. Untie the chains!
On 3/17/07 9:54 PM, "Joe Lewis Wilkins" <pepetoo at Cox.Net> wrote:

> Stephen,
> 
> So you're saying that with Rev, when the Mouse is Down, other
> messages can still be sent/received "unless" a repeat loop of the
> nature I suggested is invoked, so that it IS polling in the sense
> that it interrupts the normal flow? I guess things have gotten more
> complicated than I think they should. Of course, that's mostly
> because I'm content to do one thing at a time. Guess you could say
> I'm a stick in the mud! Thank for the observations, nonetheless.

The Hypercard way of doing this was to use a repeat loop checking for
mouseStillDown...
but mouseMove is better since Rev sends this to the card of the topmost
stack all the time, unless blocked, even when you are not checking for it.
Yep, all the time, but only when the cursor is within a Rev stack window,
which makes sense, since it sends the x,y with the message.

 Now you can have each button receive the messages:
mouseEnter
mouseLeave
which are sent by Rev.  Blocking means the buttons will not "see" them.

Malte is an expert at this stuff.  Chipp found a bug about a year ago in the
mouseLeave sequence with buttons and posted a fix, but I cannot remember the
details.

Hope this helps you Sarah.

Jim Ault
Las Vegas





More information about the use-livecode mailing list