• 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:01:48 +0200

David,

On 13.5.2004, at 18:23, David Piasecki wrote:

> Is it possible, as in some other languages, to call a method on all
> objects in an array via one line of code (no loops)?

Along with what others already recommended, I guess you want to check
High Order Messaging (eg. at www.metaobject.com). With the framework
(which you can get for free or write yourself, which is an excellent
ObjC practice) you can do it much more conveniently, like in

[[array each] whatever];

(instead of the comparatively ugly and not that flexible "[array
makeObjectsPerformSelector:@selector(whatever)]").
---
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: "David Piasecki" <email@hidden>
References: 
 >Calling a method on objects in an NSArray (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Re: Unsigned Long Long
  • Next by Date: Re: window resizing events
  • 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