Incomprehensible KVC Failure!
Incomprehensible KVC Failure!
- Subject: Incomprehensible KVC Failure!
- From: Seth Willits <email@hidden>
- Date: Tue, 17 Mar 2009 15:10:33 -0700
I have a property in one of my classes:
NSString * suggestedDiskImageName;
@property (retain, readwrite) NSString * suggestedDiskImageName;
@synthesize suggestedDiskImageName;
Which is just like a dozen others that I declare, except for some
reason that is beyond comprehension after my HOUR LONG investigation,
when I do:
1) nonNilInstance.suggestedDiskImageName = someValue;
2) [nonNilInstance setSuggestedDiskImageName:someValue];
3) [nonNilInstance setValue:someValue forKey:@"suggestedDiskImageName"];
All of them fail to trigger will/didChangeValueForKey (which I'm
overriding to see changes to all properties in my class). It actually
changes the value, but it doesn't send the KVC methods. Every other
single property works, but this one does not. I've tried multiple
values, I've tried renaming the property, I've tried using a different
instance variable, I've tried reordering the instance variables,
property declarations, and synthesize declarations just incase it was
some stupid thing like that, I've even tried calling the code from
different locations in my project.......... it always fails!
It's completely boggling my mind.
The only thing that worked was to create an implementation of
setSuggestedDiskImageName: and manually call will/didChangeValueForKey.
What on Earth can I do?
--
Seth Willits
_______________________________________________
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