Avoiding mouse polls

Dar Scott dsc at swcp.com
Sat Dec 14 02:49:01 EST 2002


On Friday, December 13, 2002, at 09:32 PM, Ken Norris (dialup) wrote:

> Sure, that's basically the idea. But unless I'm missing something, I 
> don't
> see any possibility of "catching" a mouse click with out polling for 
> it. I
> don't think it can be done any other way, but I'd like to know if it 
> can.
> Maybe there is a special Rev thing which I haven't seen.

I was thinking something like this:

Even though the only control is effectively the mouse button, I am 
assuming that there really is a (possibly hidden) pointer and that the 
mouse location is within the screen.

The card is effectively a big button.  If no mouseDown (or whatever 
works best) handler is defined in any of your objects then I expect a 
mouseDown message will get to the card.

That is, if the mouse position is over the card.  If the mouse position 
is in the center of the screen, the stack should be centered.  If the 
mouse position is unknown, then the stack should fill the screen.


Alternately, you might use the screenMouseLoc property to put the 
pointer on the card or even on a button if you feel better about this.  
You can even put it over the "highlighted" image and define the mouse 
messages as you would for other applications.

Dar Scott





More information about the Use-livecode mailing list