NSTextField when emptied sets bound ivar to nil?
NSTextField when emptied sets bound ivar to nil?
- Subject: NSTextField when emptied sets bound ivar to nil?
- From: Fritz Anderson <email@hidden>
- Date: Sat, 31 Jan 2009 13:54:57 -0600
This may be something I should have noticed years ago, but I'm
surprised. I'm checking it with the list to see if it's normal or
something to worry about. I wasn't able to Google anything on-point.
SDK is 10.4u, target 10.3, operating environment is 10.5.6.
I have an NSTextField bound through an NSController to a getter/setter
property of my model class. The property must not be nil, and when the
NSTextField first appears, it reflects the value of the property.
However, clearing the field (tab in, delete) passes nil into the
setter. This surprises me; I expected @"".
The workaround is obvious, but (1) is this the expected, and
documented behavior (and, as I said, something I should have known
about years ago)? (2) Or is it something to worry about?
— F
_______________________________________________
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