FROM : Jayson Adams
DATE : Sat Jan 26 02:43:06 2008
On Jan 25, 2008, at 4:19 PM, <email_removed> wrote:
> Ah, thanks for pointing those out, Jayson. Now that you mention
> them I do remember finding those in the past, way back in Tiger days.
>
> Unfortunately, you don't actually win the $64. Although
> mouseLocationOutsideOfEventStream is *an* answer -- and an answer
> is a lot better than no answer -- it isn't *the* answer, because
> it's not synchronized with the event stream. Although it's where
> the mouse is *now*, it's not where the mouse is "now", but rather
> where the mouse "will be" when all the events currently queued have
> been dispatched.
I wasn't trying to answer your main question, just the one about how
do you figure out where the mouse is at any time. But I also argue
that the only thing that *ever* really matters is where the mouse is,
as you say, *now*. Unless I'm trying to store every spot the mouse
has been, I don't ever want to operate on a queue of stale mouse
locations. If I'm dragging out a selection rect, for example, it's a
bug if the corner of the selection rect is not always under the mouse.
> At risk of being long-winded, I'll add that there are 2 situations
> where the distinction between now and "now" matters:
>
> -- When an application starts up. Depending where the mouse is
> relative to the window that opens, something in that window might
> get rollover highlighted inappropriately.
>
> -- When the first responder status changes to another view (such as
> a text field) and then changes back again without involving the
> mouse (such as tabbing back to the original view).
I didn't follow your examples. In general, before you decide to
highlight anything (e.g. in response to a mouseEntered: message) you
can always check to see if the mouse is really within the tracking
rect bounds. If it isn't, don't highlight anything.
Best,
__jayson
Circus Ponies NoteBook - Organization for a Creative Mind
www.circusponies.com
DATE : Sat Jan 26 02:43:06 2008
On Jan 25, 2008, at 4:19 PM, <email_removed> wrote:
> Ah, thanks for pointing those out, Jayson. Now that you mention
> them I do remember finding those in the past, way back in Tiger days.
>
> Unfortunately, you don't actually win the $64. Although
> mouseLocationOutsideOfEventStream is *an* answer -- and an answer
> is a lot better than no answer -- it isn't *the* answer, because
> it's not synchronized with the event stream. Although it's where
> the mouse is *now*, it's not where the mouse is "now", but rather
> where the mouse "will be" when all the events currently queued have
> been dispatched.
I wasn't trying to answer your main question, just the one about how
do you figure out where the mouse is at any time. But I also argue
that the only thing that *ever* really matters is where the mouse is,
as you say, *now*. Unless I'm trying to store every spot the mouse
has been, I don't ever want to operate on a queue of stale mouse
locations. If I'm dragging out a selection rect, for example, it's a
bug if the corner of the selection rect is not always under the mouse.
> At risk of being long-winded, I'll add that there are 2 situations
> where the distinction between now and "now" matters:
>
> -- When an application starts up. Depending where the mouse is
> relative to the window that opens, something in that window might
> get rollover highlighted inappropriately.
>
> -- When the first responder status changes to another view (such as
> a text field) and then changes back again without involving the
> mouse (such as tabbing back to the original view).
I didn't follow your examples. In general, before you decide to
highlight anything (e.g. in response to a mouseEntered: message) you
can always check to see if the mouse is really within the tracking
rect bounds. If it isn't, don't highlight anything.
Best,
__jayson
Circus Ponies NoteBook - Organization for a Creative Mind
www.circusponies.com
| Related mails | Author | Date |
|---|---|---|
| quinceymorris | Jan 25, 23:51 | |
| Jayson Adams | Jan 26, 00:38 | |
| quinceymorris | Jan 26, 01:19 | |
| Jayson Adams | Jan 26, 02:43 | |
| Quincey Morris | Jan 28, 01:54 | |
| Jayson Adams | Jan 28, 02:41 | |
| Quincey Morris | Jan 28, 08:46 | |
| Jayson Adams | Jan 28, 18:51 | |
| Clark Cox | Jan 28, 19:24 | |
| Jayson Adams | Jan 28, 19:51 | |
| Hamish Allan | Jan 28, 20:21 | |
| Jayson Adams | Jan 28, 20:26 | |
| Hamish Allan | Jan 28, 20:44 | |
| Jayson Adams | Jan 28, 21:02 | |
| Hamish Allan | Jan 28, 23:59 | |
| Sam Stigler | Jan 29, 01:31 | |
| Wesley Smith | Jan 29, 01:41 | |
| Jayson Adams | Jan 29, 02:26 | |
| Hamish Allan | Jan 29, 14:03 | |
| Clark Cox | Jan 29, 17:23 | |
| John Stiles | Jan 29, 18:36 | |
| Quincey Morris | Jan 29, 19:32 | |
| Scott Anguish | Jan 30, 03:41 | |
| Scott Anguish | Jan 30, 03:43 | |
| Hamish Allan | Jan 30, 06:20 | |
| Quincey Morris | Jan 30, 08:34 |






Cocoa mail archive

