Re: A cursor bug in DragItemAround example

2008-04-29 Thread an0
Thanks again. It seems tracking area is not suited for this application. And I revert to cursor rect finally. Wish a better tracking area from Apple. On Mon, Apr 28, 2008 at 1:30 AM, Quincey Morris <[EMAIL PROTECTED]> wrote: > I think the problem is that you are not properly handling *responsibil

Re: A cursor bug in DragItemAround example

2008-04-27 Thread an0
On Sun, Apr 27, 2008 at 3:34 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > > On Apr 26, 2008, at 23:14, an0 wrote: > Setting a cursor always "works", but is useless if something else changes > it immediately afterwards. I think that might be what's happening here. > (Also, if view comes from a

Re: A cursor bug in DragItemAround example

2008-04-26 Thread an0
> My guess is that the cursor you set is getting changed back to the > arrow by the cursorUpdate: method of another view. > > IIRC, you have a NSScrollView whose document view (view A) is > something like a canvas, and has some smaller subviews (each a view B) > that are like graphic objects on the

Re: A cursor bug in DragItemAround example

2008-04-26 Thread Quincey Morris
On Apr 26, 2008, at 08:47, an0 wrote: Thanks. I've tried NSTrackingArea, and it seems a clearer concept and easier to use. However, there are still two problems I can't fix: 1. Setting cursor in initWithFrame: and awakeFromNib does not have effect. So I can't set the initial cursor. 2. Setting

Re: A cursor bug in DragItemAround example

2008-04-26 Thread an0
> Does this sample application still use cursorRects/NSTrackingRects? > Leopard introduced a new mechanism -- NSTrackingArea and cursorUpdate > events -- which doesn't have some of the problems that the old > mechanism supposedly had. > > With NSTrackingArea and cursorUpdate you should be able to g

Re: A cursor bug in DragItemAround example

2008-04-23 Thread Scott Anguish
On Apr 23, 2008, at 6:44 PM, Quincey Morris wrote: On Apr 23, 2008, at 08:10, an0 wrote: Chances are, calling '[[self enclosingScrollView] setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the problem you're seeing. NSScrollView/NSClipView's way of changing the cur

Re: A cursor bug in DragItemAround example

2008-04-23 Thread Quincey Morris
On Apr 23, 2008, at 08:10, an0 wrote: Chances are, calling '[[self enclosingScrollView] setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the problem you're seeing. NSScrollView/NSClipView's way of changing the cursor conflicts with autoscrolling or drag-scrolling, bu

Re: A cursor bug in DragItemAround example

2008-04-23 Thread an0
> Chances are, calling '[[self enclosingScrollView] > setDocumentCursor:[NSCursor closedHandCursor]]' in 'mouseDown:' will fix the > problem you're seeing. NSScrollView/NSClipView's way of changing the cursor > conflicts with autoscrolling or drag-scrolling, but AFAIK there's no way of > preventin

Re: A cursor bug in DragItemAround example

2008-04-21 Thread Mike Wright
On 21 Apr 2008 07:41:25 -0700 , Jens Alfke <[EMAIL PROTECTED]> wrote: On 21 Apr '08, at 6:22 AM, Ling Wang wrote: Do you mean that it is unclear why this happens and there is no way for application developers to avoid this annoyance? As far as I know, yes. :-( —Jens Perhaps it's not relat

Re: A cursor bug in DragItemAround example

2008-04-21 Thread Jens Alfke
On 21 Apr '08, at 6:22 AM, Ling Wang wrote: Do you mean that it is unclear why this happens and there is no way for application developers to avoid this annoyance? As far as I know, yes. :-( —Jens smime.p7s Description: S/MIME cryptographic signature ___

Re: A cursor bug in DragItemAround example

2008-04-21 Thread Ling Wang
Cursor-tracking glitches, where the cursor doesn't revert when exiting a view, are really common in Cocoa apps. I see them in all kinds of apps, even major Apple ones like Mail and Xcode. I think it's due to bugs in AppKit, unfortunately. These bugs have been around since at least 10.0, but

Re: A cursor bug in DragItemAround example

2008-04-20 Thread Quincey Morris
On Apr 20, 2008, at 03:43, Ling Wang wrote: You can see the code at http://developer.apple.com/samplecode/DragItemAround/listing2.html on ADC. The bug is that the cursor reverts to arrowCursor if the item is dragged off the bound calculated at the mouseDown event just before current mous

Re: A cursor bug in DragItemAround example

2008-04-20 Thread Jens Alfke
On 20 Apr '08, at 3:43 AM, Ling Wang wrote: The bug is that the cursor reverts to arrowCursor if the item is dragged off the bound calculated at the mouseDown event just before current mouseDragged event, instead of staying closedHandCursor. Maybe it will be clear till you try to run it.

A cursor bug in DragItemAround example

2008-04-20 Thread Ling Wang
You can see the code at http://developer.apple.com/samplecode/DragItemAround/listing2.html on ADC. The bug is that the cursor reverts to arrowCursor if the item is dragged off the bound calculated at the mouseDown event just before current mouseDragged event, instead of staying closedHandCu