• 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
Newbie - which NSTextField is the cursor in?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie - which NSTextField is the cursor in?


  • Subject: Newbie - which NSTextField is the cursor in?
  • From: Graham Gyatt <email@hidden>
  • Date: Sun, 17 Mar 2002 18:13:19 -0800

I have an fairly straightforward MVC-type app with several NSTextFields, one of which (we'll call it T) I'm toggling between editable/non-editable states depending on the state of a check box. If the cursor is in T when the check box gets unchecked, I first make T uneditable and then I want to politely put the cursor in another field for the user, but to do this I need to be able to find out which NSTextField the cursor is in (I don't want to touch the cursor if it is not in T). I've tried looking at [NSView focusView] but this returns the check box that just got clicked, and [Window firstResponder] doesn't seem to help either. I guess I could track it myself with a global by adding notifiers to each NSTextField, but I suspect there is an easier way that I'm missing. Any suggestions to help me on my way?
Thanks
- Graham
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Prev by Date: Making application a daemon
  • Next by Date: Example: How to Tint an Image
  • Previous by thread: Re: Making application a daemon
  • Next by thread: Re: Newbie - which NSTextField is the cursor in?
  • Index(es):
    • Date
    • Thread