• 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: "-forwardInvocation:" like NSInvocation creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "-forwardInvocation:" like NSInvocation creation


  • Subject: Re: "-forwardInvocation:" like NSInvocation creation
  • From: Jerry Krinock <email@hidden>
  • Date: Mon, 29 Mar 2010 12:31:31 -0700

On 2010 Mar 29, at 12:06, Philip Mötteli wrote:

> I never said, it's not possible. But it's a huge task to re-implement a general method like this. If you understand, that you have to treat every different argument type dynamically.

Maybe I don't understand, but a couple years ago I wrote this little method that creates an invocation in one line of code

+ (NSInvocation*)invocationWithTarget:(id)target
                             selector:(SEL)selector
                      retainArguments:(BOOL)retainArguments
                    argumentAddresses:(void*)firstArgumentAddress, ... ;

It handles all argument types, using varargs and the method signature of the selector.  I'll post the code if you're interested.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: "-forwardInvocation:" like NSInvocation creation
      • From: Philip Mötteli <email@hidden>
References: 
 >"-forwardInvocation:" like NSInvocation creation (From: Philip Mötteli <email@hidden>)
 >Re: "-forwardInvocation:" like NSInvocation creation (From: Philip Mötteli <email@hidden>)
 >Re: "-forwardInvocation:" like NSInvocation creation (From: Jerry Krinock <email@hidden>)
 >Re: "-forwardInvocation:" like NSInvocation creation (From: Philip Mötteli <email@hidden>)

  • Prev by Date: Re: How to get wifi information
  • Next by Date: Removing Object form ArrayController without managedObjectContext
  • Previous by thread: Re: "-forwardInvocation:" like NSInvocation creation
  • Next by thread: Re: "-forwardInvocation:" like NSInvocation creation
  • Index(es):
    • Date
    • Thread