• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cursor updates - bug or programmer ignorance?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cursor updates - bug or programmer ignorance?


  • Subject: Re: Cursor updates - bug or programmer ignorance?
  • From: Quincey Morris <email@hidden>
  • Date: Mon, 19 Jan 2009 11:23:34 -0800

On Jan 19, 2009, at 11:00, Luke Evans wrote:

The odd behaviour is that the cursor is reset back to the regular arrowCursor after a few seconds, with the cursor still over the view. At this point I don't know 'who' is doing this or why; nor how to stop it.

The -updateTrackingAreas method is called exactly once in my simple test (I wondered if some change in the state of the tracking areas would reset the cursor state - but evidently it's not as simple as that).

There's a good chance that I'm displaying continued ignorance of Cocoa - but I've been through the docs several times for clues without enlightenment. Surely the system should be able to change the cursor on you without giving you a chance to reassert the cursor you want (even if it does this on some kind of timer to avoid stale cursor states from poorly written application code - or whatever).

Is there a parallel mechanism to the tracking areas here that I should also be interacting with to ensure that my cursor stays set the way I want it?

It's poorly documented, but a NSScrollView (or perhaps its NSClipView) will sometimes reset the cursor, and your NSTableView is of course embedded in a NSScrollView. However, I've only seen it change the cursor like this when the mouse is down (e.g. autoscrolling or interacting with the scroll bars).


If you're only seeing the problem while the mouse is down, you can call [NSScrollView setDocumentCursor: [NSCursor openHandCursor]] on mouseDown, and set it back to the standard cursor on mouseUp.

There's also an easy experiment you can try. In your subclass initialization, call [NSScrollView setDocumentCursor:] with an easily recognizable cursor that you don't otherwise use. Then if your problem is NSScrollView's fault, the cursor will switch to that cursor instead of the arrow.

HTH


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Cursor updates - bug or programmer ignorance? (From: Luke Evans <email@hidden>)

  • Prev by Date: Re: Dealing with exceptions in a drawing stack
  • Next by Date: Re: "Cocoa Fundamentals Guide" Clarification
  • Previous by thread: Cursor updates - bug or programmer ignorance?
  • Next by thread: Re: Cursor updates - bug or programmer ignorance?
  • Index(es):
    • Date
    • Thread