On Jul 16, 2008, at 3:12 PM, Brian Hughes wrote:

I want the default button to reflect where the user has decided to enter information. I have a sign up / log in page. If the user is new and is signing up I want the signUp button to be the default but if the user is already signed up and elects to use the log in field I want the logIn button to be default.

I have assigned the signIn Button to be the default in Interface Builder by designating the key equivalent to be the return key. When the user elects to log in I want the default button to become the logIn Button. Here is my code:


- (void )controlTextDidBeginEditing: (NSNotification *) aNotification
{
        if ([logInNameField isEqual: [aNotification object]])
        {
                [logInButtonOutlet setKeyEquivalent: @"/r"];

You probably want "\r" there.
_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to