• 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: Calling a method on objects in an NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling a method on objects in an NSArray


  • Subject: Re: Calling a method on objects in an NSArray
  • From: Ondra Cada <email@hidden>
  • Date: Thu, 13 May 2004 21:13:18 +0200

David,

On 13.5.2004, at 20:04, David Piasecki wrote:

> That's cool. I didn't realize you could use valueForKey that way.

There's more magic in there: check the standard KVC documentation of
those @... special keys. One example may be

[array valueForKey(@"@avg.foo");

which sends each item of the array the message "foo" and computes (and
returns) the average of all the results.

On thing I don't know myself is whether you can define your own @...
keys. I fear not, for I haven't bumped into a description so far, but
in this I may be (and would like to be ;)) wrong.
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
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.


  • Follow-Ups:
    • Re: Calling a method on objects in an NSArray
      • From: Scott Anguish <email@hidden>
References: 
 >Calling a method on objects in an NSArray (From: "David Piasecki" <email@hidden>)
 >Re: Calling a method on objects in an NSArray (From: Allan Odgaard <email@hidden>)
 >Re: Calling a method on objects in an NSArray (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Re: Calling a method on objects in an NSArray
  • Next by Date: Re: [ANN] Searchable Cocoa-Dev Web Archive
  • Previous by thread: Re: Calling a method on objects in an NSArray
  • Next by thread: Re: Calling a method on objects in an NSArray
  • Index(es):
    • Date
    • Thread