[NSControl stringValue] in accessoryView
[NSControl stringValue] in accessoryView
- Subject: [NSControl stringValue] in accessoryView
- From: Dragan Milić <email@hidden>
- Date: Wed, 31 Oct 2007 01:03:38 +0100
I've noticed quite strange behaviour of some NSTextField (actually
NSSecureTextField) instances if they are placed in accessoryView of
NSSavePanel of the NSDocument in Leopard.
I've got four secure text fields, two in a "regular" subview of a
window, the other two in an accessoryView. All four text fields have
got completely the same settings and the delegate for all of them is
the same NSObject subclass instance. The delegate implements -(void)
controlTextDidChange:(NSNotification *)notification method. When
typing in the pair which is contained in the "regular" view, the
delegate method is called accordingly and checking for string values
of those text fields using -stringValue gives correct results, with
string values updated in accordance to my typing. But, when typing in
the two fields inside the accessory view, the delegate method is
called, but string values are not updated. They get updated only
after the text field is focused out.
For example, start with empty text field, and type "Apple"; the
delegate method is called five times, with correct object passed as
notification's object, but all five times the string value is empty
string: "". Then, change the focus to some other control, and bring
it back to the text field. Continue typing, so the resulting text is
"AppleMac". The delegate method is called for another three times,
but each time the string value of the text field is "Apple". And so
on...
In Tiger (and earlier) this used to work correctly. Has anyone else
experienced anything similar?
Milke.
_______________________________________________
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