• 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: Allan Odgaard <email@hidden>
  • Date: Thu, 13 May 2004 21:55:53 +0200

On 13. May 2004, at 20:02, David Piasecki wrote:

Unfortunately, makeObjectsPerformSelector:withObject only allows you to send a single object as a parameter, and that object must be an Obj-C object. I wanted to pass an NSSize structure. I'm working around it, but it's just kind of annoying.

You could use CocoaSTL, this allows you to use standard C++ library algorithms (like for_each) on Cocoa "collections", and there is also a helper to wrap a selector as a functor, on which you can then use the standard library's binder functions to bind arguments -- but the advantages then starts to become questionable.

If you want short syntax, you probably want to use something else than Objective-C, RubyCocoa comes to mind, although I do not know how integrated it has become (e.g. if Cocoa collections implement the Enumerable mix-in etc.).
_______________________________________________
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: 
 >RE: Calling a method on objects in an NSArray (From: "Jonathan E. Jackel" <email@hidden>)
 >Re: Calling a method on objects in an NSArray (From: "David Piasecki" <email@hidden>)

  • Prev by Date: Passing a path with spaces inside
  • Next by Date: Re: Cocoa Programming for Mac OS X (SE)
  • 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