Am 29.03.2010 um 20:49 schrieb Jerry Krinock: > 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.
That's exactly the point. Apple uses this everytime -forward:: is called. Why hide it now from us. It was available for years. > You've got the target (self), selector (_cmd), and arguments in there. You > should be able to create an invocation with available methods, 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. > No touching stack frames needed! We're high-level folks here. Not when we have to re-implement the same thing a few thousend times instead of just once! This is called redundancy, which you as a high level guy should know to avoid. That's the reason, why Apple implemented a general method in -forward::. _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com