Re: Modal Window for NSTextField
Re: Modal Window for NSTextField
- Subject: Re: Modal Window for NSTextField
- From: Seth Willits <email@hidden>
- Date: Mon, 02 Jan 2012 10:28:07 -0800
On Jan 2, 2012, at 4:02 AM, Dany Golubitsky wrote:
> // Make the text field "in focus", and start an editing session on it
> [textField becomeFirstResponder];
-becomeFirstResponder is a notification method for when the responder becomes first responder; it doesn't *make* it first responder. For that you want [window makeFirstResponder:].
> Now I tried 2 approaches:
Both are wacky as Michael explained.
You do not need the window to be modal at all. The solution is really simple. Just start editing the text field, and when the editing is done (controlTextDidEndEditing: notification), you just remove the text field.
--
Seth Willits
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden