Hello again. I am sorry, I am new to Cocoa and some things that looks completely obvious to you are completely unknown to me. (controlTextDidEndEditing: notification) - What is this function, where should it be implemented, who should call it? How need I start the TextField?
For my code I need to call opening function, wait for it to open, get text from user and return. Meaning: { Block 1 } Calling for TextField and waiting for return value. { Block 2 } Getting return value in some other place is not an option. Is there any example of this? Thanks! -----Original Message----- From: cocoa-dev-bounces+danyg=waves....@lists.apple.com [mailto:cocoa-dev-bounces+danyg=waves....@lists.apple.com] On Behalf Of Seth Willits Sent: Monday, January 02, 2012 20:28 To: cocoa-dev cocoa-dev Subject: Re: Modal Window for NSTextField 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 (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/danyg%40waves.com This email sent to da...@waves.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com