• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Incomprehensible KVC Failure!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Incomprehensible KVC Failure!
      • From: Quincey Morris <email@hidden>
    • Re: Incomprehensible KVC Failure!
      • From: Markus Spoettl <email@hidden>
  • Prev by Date: Re: UIView hidden - still drawing the subviews?
  • Next by Date: Re: [iPhone] NumberPad with the dot
  • Previous by thread: Re: UIView hidden - still drawing the subviews?
  • Next by thread: Re: Incomprehensible KVC Failure!
  • Index(es):
    • Date
    • Thread