Scott Rossi wrote:
> Recently, Kevin Miller wrote:
>
> > perhaps there is room for a new
> > function here? How about mouseDownLoc()?
>
> At first I thought this was a good idea, but then it occurred
> to me that it would probably be useful to make a distinction
> between a "one-time" function (ie clickLoc, which doesn't
> change if the mouse is moved) and a "continuous" function
> (ie mouseLoc, which does change as the mouse is moved).
Am I missing something? What would your proposed function do that
"if the mouse is down then return the mouseLoc"
doesn't already do?
> I'm not sure if clickDownLoc or downClickLoc make sense,
> but I do think these imply the click-related aspect better
> than mouseDownLoc. I would expect mouseDownLoc to
> continuously provide mouseLoc coordinates while the mouse
> is down, as opposed to a click location.
And what would it return, if the mouse wasn't down?
> Does this make sense? Any other ideas for an alternate syntax?
How about this:
"the mouseLoc" returns the current position of the mouse, regardless of
whether it is up or down (as it already does);
"the mouse" returns the state of the mouse (as it already does);
"the clickLoc" / "clickLoc()" keeps its current behaviour, for
compatability;
"clickLoc(down)" returns the location where the click was begun (mouse
button pushed down);
"clickLoc(up)" returns the location where the click was finished (mouse
button released); If the mouse is still down from the previous click,
clickLoc(up) returns empty.
--
Steven D'Aprano
==========================================
M.B. Sales Pty Ltd Ph: +61 3 9460-5244
A.C.N. 005-964-796 Fax: +61 3 9462-1161
Archives: http://www.mail-archive.com/metacard%40lists.best.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.