Re: "-forwardInvocation:" like NSInvocation creation
Re: "-forwardInvocation:" like NSInvocation creation
- Subject: Re: "-forwardInvocation:" like NSInvocation creation
- From: Philip Mötteli <email@hidden>
- Date: Mon, 29 Mar 2010 21:53:30 +0200
Am 29.03.2010 um 21:31 schrieb Jerry Krinock:
> 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.
That's a big step into the right direction.
> I'll post the code if you're interested.
That would be nice!
Thanks!
_______________________________________________
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