Creating an NSInvocation from an NSMethodSignature
Creating an NSInvocation from an NSMethodSignature
- Subject: Creating an NSInvocation from an NSMethodSignature
- From: Mike Mangino <email@hidden>
- Date: Mon, 11 May 2009 09:04:46 -0400
I'm working on some changes to the OCMock framework to better support
partial mocks and I'm a little stuck. In short, I'm trying to write a
single method that I can attach to a class. I'm trying to make that
method call through to the existing Mock recording code. It's based on
NSProxy and expects to receive and NSInvocation.
Creating the NSInvocation is easy. I'm not sure, however, how to fill
in the parameters. The NSMethodSignature gives me the type encoding.
Is there a way to use this information along with the address of the
self parameter to fill in the params? I know how to get the type of
each parameter, is there some way to convert the type string returned
by getArgumentTypeAtIndex: to a size?
Thanks!
Mike
--
Mike Mangino
http://www.elevatedrails.com
_______________________________________________
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