Thanks Tim, [loginWindow makeFirstResponder:nil]; worked for me
Ron On Fri, Sep 5, 2008 at 2:44 PM, Tim Isted <[EMAIL PROTECTED]> wrote: > Depending on how you're implementing your login dialog, if you have a > method that is called when the ok button is clicked and you have IBOutlets > for the text field or the login dialog itself, in that method you can > either: > > a) call [theTextField commitEditing]; on the text field or > > b) call [loginWindow makeFirstResponder:nil]; > > The second way will take first responder status away from any currently > uncommitted text field editor (ie the current first responder) and force it > to commit its editing without you having explicity to call commitEditing on > that text field (and any other text fields that might currently have > un-committed data like a username field etc). > > Hope that helps, > Tim > > > > On 5 Sep 2008, at 19:12, Ronnie B wrote: > > Hi All. >> >> I have a login dialog with a text field for password and OK and Cancel >> buttons. But, unless I hit Enter key, the text field value does not get >> submitted. What can I do to have it working only with the OK buttons, >> >> Thanks, >> R. >> > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > 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/ronny.boo%40gmail.com > > This email sent to [EMAIL PROTECTED] > _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [EMAIL PROTECTED]
