MouseTracker question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

MouseTracker question

Christoph J. Bachinger
Hi all,
only to understand Dolphin. What is the sense of
SessionManager inputState loopWhile: [View capture == self view].
in
MouseTracker startTacking: aMouseTrackerTarget

I removed it and checked Splitter Scribble and my Application and can't
see any different behavier.

thanks
cjb


Reply | Threaded
Open this post in threaded view
|

Re: MouseTracker question

Blair McGlashan-3
"Christoph J. Bachinger" <[hidden email]> wrote in message
news:[hidden email]...
> Hi all,
> only to understand Dolphin. What is the sense of
> SessionManager inputState loopWhile: [View capture == self view].
> in
> MouseTracker startTacking: aMouseTrackerTarget
>
> I removed it and checked Splitter Scribble and my Application and can't
> see any different behavier.
>

The comment on the line above which says "Don't return until capture is
released" means that this is to prevent the method returning until the mouse
tracking session is over.

This only matters if the caller expects to take some action at the end of
the capture, and does not expect the mouse to remain captured when
#startTracking: returns. In many cases (Scribble being one) this makes no
difference, but it matters to the view composer, for example, which updates
certain things after a dragging a window around to resize or move it.
Another case in point is the VisualObjectFinder, which displays a find
cursor until mouse tracking is released.

Regards

Blair


Reply | Threaded
Open this post in threaded view
|

Re: MouseTracker question

Christoph J. Bachinger
Blair McGlashan schrieb:

> "Christoph J. Bachinger" <[hidden email]> wrote in message
> news:[hidden email]...
>
>>Hi all,
>>only to understand Dolphin. What is the sense of
>>SessionManager inputState loopWhile: [View capture == self view].
>>in
>>MouseTracker startTacking: aMouseTrackerTarget
>>
>>I removed it and checked Splitter Scribble and my Application and can't
>>see any different behavier.
>>
>
>
> The comment on the line above which says "Don't return until capture is
> released" means that this is to prevent the method returning until the mouse
> tracking session is over.
>
> This only matters if the caller expects to take some action at the end of
> the capture, and does not expect the mouse to remain captured when
> #startTracking: returns. In many cases (Scribble being one) this makes no
> difference, but it matters to the view composer, for example, which updates
> certain things after a dragging a window around to resize or move it.
> Another case in point is the VisualObjectFinder, which displays a find
> cursor until mouse tracking is released.
>
> Regards
>
> Blair
>
>
>

Thanks Blair for your explaination. For my Job I need a own Interactor
subclass. Because I have to handle Dialogs and Menus.

CJB