• 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: How do you set the cursor for a view when first visible?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How do you set the cursor for a view when first visible?


  • Subject: Re: How do you set the cursor for a view when first visible?
  • From: Ricky Sharp <email@hidden>
  • Date: Tue, 27 Dec 2005 18:38:32 -0600


On Dec 27, 2005, at 6:20 PM, Scott Andrew wrote:

I have a question. I have a view and when it first appears i need to set the cursor, to something besides the arrow, when the window is made visible. Of course i want to se the cursor only if the window appears and my mouse is over the window.

You typically provide an implementation of resetCursorRects in your view subclass(es). In there, you call addCursorRect:cursor: for each rectangle of interest (this is sometimes just a single rect being the view's bounds).

The framework is responsible for calling resetCursorRects at the appropriate times so there's nothing else you need to do.

However, there appears to be a bug (I need to file one soon) such that if the mouse cursor is over the view when the view is brought into view, the cursor is not set to your cursor. You first have to move off, then back into the view. You can duplicate this bug by running Apple's PDFView sample code. After you launch the app, quickly move the mouse anywhere where the app's window will appear.

It seems if i do it during awakeFromNib: or viewDidMoveToWindow: in the view the cursor gets set back. The other problem is that this is a photoshop plugin and i am not using NSCursor. I am trying to use the cursors that photosohp supplies by using a photoshop supplied call, which is basically a Carbon call setting the cursor.

Any clues would be great.. Do i do it in my window and not my view?

I cannot speak for the plugin and what restrictions that may impose. I'm assuming that plugins can be both Carbon-based or Cocoa? Or are they ultimately all Carbon and can just bring up Cocoa windows?

___________________________________________________________
Ricky A. Sharp mailto:email@hidden
Instant Interactive(tm) http://www.instantinteractive.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >How do you set the cursor for a view when first visible? (From: Scott Andrew <email@hidden>)

  • Prev by Date: Re: how does IB draw connections outside its windows?
  • Next by Date: dealloc instantiated objects created in Interface Builder
  • Previous by thread: How do you set the cursor for a view when first visible?
  • Next by thread: dealloc instantiated objects created in Interface Builder
  • Index(es):
    • Date
    • Thread