• 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
setValue:forUndefinedKey:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setValue:forUndefinedKey:


  • Subject: setValue:forUndefinedKey:
  • From: Tore Halset <email@hidden>
  • Date: Thu, 12 Oct 2006 01:03:31 +0200

Hello.

My object has some properties in a dictionary. It is like NSManagedObject that has (I guess) the properties in a Dictionary. Some of the properties have specific set/get methods, others do not. They should all be accessible with key value coding. I have read about setValue:forKey:'s search order at this web page:

http://developer.apple.com/documentation/Cocoa/Conceptual/ KeyValueCoding/Concepts/SearchImplementation.html

My current solution is to implement a setValue:forUndefinedKey: that look up in the Dictionary for properties that do not have a separate set method. It is working. Is this a good idea or should I override setValue:forKey: instead?

 - Tore.
_______________________________________________
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


  • Follow-Ups:
    • Re: setValue:forUndefinedKey:
      • From: Keary Suska <email@hidden>
  • Prev by Date: Re: Double-click and drag word in NSTextView
  • Next by Date: Re: Disk Device Description
  • Previous by thread: NSTableView editing error with TAB key ...
  • Next by thread: Re: setValue:forUndefinedKey:
  • Index(es):
    • Date
    • Thread