Re: Doc-based app, text fields, and losing focus
Re: Doc-based app, text fields, and losing focus
- Subject: Re: Doc-based app, text fields, and losing focus
- From: "Louis C. Sacha" <email@hidden>
- Date: Tue, 25 Nov 2003 15:37:56 -0800
Hello...
For the NSTextField controls, the delegate of the control will have
the following method called when the textField is about to lose
focus... (see "Methods Implemented by the Delegate" at the end of the
docs for NSControl, which is the superclass of NSTextField)
- (void)controlTextDidEndEditing:(NSNotification *)aNotification
For the NSTextView objects, the delegate of the view should have the
following method called before the focus shifts away from the
textView... (see "Methods Implemented by the Delegate" at the end of
the docs for NSTextView)
- (void)textDidChange:(NSNotification *)aNotification
Hope that helps.
Louis
Hi all. I have a doc-based app. On this I have several text
fields. What I would like to do is to monitor when focus is lost on
a text field, I want to check to see if the field is empty. If so,
I want a dialog to prompt the user to enter a value. Basically, I
want to make sure every field is filled in.
I know I can use notifications and NSAlert and all of that, but I
don't know how to catch it when focus moves to another text field.
I have 5 NSTextFields, and 2 NSTextViews.
So, how would I go about catching focus lost on a text field? Just
a push in the right direction is all I ask. If anyone knows of any
tutorials, that would be cool too.
James
_______________________________________________
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.
_______________________________________________
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.