benwad
benwad

Reputation: 6594

How to watch for changes in [NSCursor currentCursor]?

I've got an app with a custom cursor which I achieved using a custom wrapper for NSCursor (most of the main code is designed to be OS portable, so above that I pretend the NSCursor is a Windows-style cursor). I'm having a few issues with the cursor not changing back to my custom one when the user cmd+tabs back into the window, and I'd like to see what is changing the value of currentCursor. Everywhere I've tried to set breakpoints has given me nothing so far.

So, I was wondering if there was a way (in Xcode) to break as soon as the value of [NSCursor currentCursor] changes. Is this possible? Is this kind of data accessible to my app?

Thanks - I hope I've made myself clear. It's quite hard to explain when I'm not even sure what I want to do!

Upvotes: 5

Views: 765

Answers (1)

uchuugaka
uchuugaka

Reputation: 12782

NSCursor has a class method currentSystemCursor that will give you what you need in 10.6 and later.

Upvotes: 0

Related Questions