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

Re: setValue:forUndefinedKey:


  • Subject: Re: setValue:forUndefinedKey:
  • From: Tore Halset <email@hidden>
  • Date: Thu, 12 Oct 2006 09:39:22 +0200

On Oct 12, 2006, at 3:10, Keary Suska wrote:

on 10/11/06 5:03 PM, email@hidden purportedly said:

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?

Using setValue:forUndefinedKey: is the only way I have found to do this. If
you override setvalue:forkey: you will have to handle KVO notifications in
your override, or your bindings won't update properly. So it's an easier
solution, however inelegant.

Okay, thanks. My problem with overriding setValue:forKey: is that any custom set/get methods are not called. I guess my custom setValue:forKey: should follow key-value search ordering and look for custom set/get methods for the given key. Would like to see some examples on how to do this? :)


Core Data/NSManagedObject is probably a more elegant solution but I haven't
pursued it yet.

I am not able to use NSManagedObject on this, but it looks like NSManagedObject has solved this issue in some sort. But how?


 - 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>
References: 
 >Re: setValue:forUndefinedKey: (From: Keary Suska <email@hidden>)

  • Prev by Date: [Moderator] EOT Re: Upgrade System
  • Next by Date: Re: How to do iTunes 7 like "Source" list?
  • Previous by thread: Re: setValue:forUndefinedKey:
  • Next by thread: Re: setValue:forUndefinedKey:
  • Index(es):
    • Date
    • Thread