Re: "-forwardInvocation:" like NSInvocation creation
Re: "-forwardInvocation:" like NSInvocation creation
- Subject: Re: "-forwardInvocation:" like NSInvocation creation
- From: Jerry Krinock <email@hidden>
- Date: Mon, 29 Mar 2010 11:49:01 -0700
On 2010 Mar 29, at 11:15, Philip Mötteli wrote:
> - someMethodWithArgument:(struct *)anArgument andSomeOtherArgument:(id)anotherArgument
> {
> // Here I want to create an NSInvocation, capturing the call of this method. Something like:
> NSInvocation *anInvocation = [NSInvocation initWithArgframe: (arglist_t)frame selector: _cmd];
> }
I don't see anything special about your situation. You've got the target (self), selector (_cmd), and arguments in there. You should be able to create an invocation with available methods, for example +[NSInvocation invocationWithMethodSignature:], then add arguments.
http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/DistrObjects/Tasks/invocations.html
No touching stack frames needed! We're high-level folks here.
_______________________________________________
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