Newbie - which NSTextField is the cursor in?
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.