BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • How do you set the cursor for a view when first visible?

    1 answers - 971 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    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. course i want to se the cursor only if the window
    appears and my mouse is over the window.
    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?
    Scott Andrew
    Do not post admin requests to the list. They will be ignored.
    Cocoa-dev mailing list (Cocoa-dev (AT) lists (DOT) apple.com)
    Help/Unsubscribe/Update your Subscription:
    %40developershed.com
    This email sent to bsdarchive (AT) developershed (DOT) com
  • No.1 | | 2128 bytes | |

    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. 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? are
    they ultimately all Carbon and can just bring up Cocoa windows?

    Ricky A. Sharp mailto:rsharp (AT) instantinteractive (DOT) com
    Instant Interactive(tm)

    Do not post admin requests to the list. They will be ignored.
    Cocoa-dev mailing list (Cocoa-dev (AT) lists (DOT) apple.com)
    Help/Unsubscribe/Update your Subscription:
    %40developershed.com

    This email sent to bsdarchive (AT) developershed (DOT) com

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


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 0 =
QUESTION ON "BSD"

EMSDN.COM