• 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: Simple Key Value Coding Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simple Key Value Coding Question


  • Subject: Re: Simple Key Value Coding Question
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 24 Apr 2004 16:10:51 -0700

On Apr 24, 2004, at 12:32 PM, Keith Renz wrote:
This seems like a waste when there's probably a more elegant way.

I don't think there is. You can use KVC to manipulate every object in your array in the same way, but there's no -setValues:forKey: (for example) that will iterate over every element in your array and send each one -setValue:forKey: with the appropriate entry from an array you pass.

You can always encapsulate this functionality in its own method, of course, and even put that in a category if you want.

Alternately, Marcel Weiher's Higher-Order Messaging system may let you do this in an elegant fashion.

-- Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Simple Key Value Coding Question (From: Keith Renz <email@hidden>)

  • Prev by Date: Re: in-program database solution
  • Next by Date: Adding a Systems Preference panel
  • Previous by thread: Simple Key Value Coding Question
  • Next by thread: in-program database solution
  • Index(es):
    • Date
    • Thread