Possible bug in NSTextField?
Possible bug in NSTextField?
- Subject: Possible bug in NSTextField?
- From: Jerrod Fowkes <email@hidden>
- Date: Tue, 25 Apr 2006 11:07:10 -0700 (PDT)
Hello,
Rather interesting. I have 3 componets on a window. NSTextField, NSSecureTextField and NSButton. They are being used as a login window that accepts a username, a password and then a button to "sign in". When the user fills in the information I want the NSTextField and the NSSecure* to go grey and not be editable / accessable. So, I have the following code:
if (!signedIn)
{
[txtEmail setEditable: No];
[txtEmail setSelectable: No];
txtEmail setBackgroundColor: [NSColor grayColor]];
[txtPassword setEditable: No];
[txtPassword setSelectable: No];
txtPassword setBackgroundColor: [NSColor grayColor]];
signedIn = TRUE;
}
else
{
[txtEmail setEditable: YES];
[txtEmail setSelectable: YES];
txtEmail setBackgroundColor: [NSColor whiteColor]];
[txtPassword setEditable: YES];
[txtPassword setSelectable: YES];
txtPassword setBackgroundColor: [NSColor whiteColor]];
signedIn = FALSE;
}
Well the problem is, only when the window first comes up, I fill in the username and then fill in the password and click the button. When I click it, everything goes gray but the password NSTextField still has focus and you can still edit what is inside of it. I honestly don't think this should be. Plus I don't know Cocoa enough to attempt another solution --> Doesnt' appear to be at this point. What is seems like, is when you click the button, editable focus should be lost from the previous control and focus should be given to the button, thus if the setEditable method should be called, it would be handled appropriately. -Jerrod Fowkes
---------------------------------
Love cheap thrills? Enjoy PC-to-Phone calls to 30+ countries for just 2ยข/min with Yahoo! Messenger with Voice.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden