Re: Calling a method on objects in an NSArray
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.