• 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
Creating an NSInvocation from an NSMethodSignature
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Creating an NSInvocation from an NSMethodSignature
      • From: Michael Ash <email@hidden>
  • Prev by Date: Save dictionary to local file please help!
  • Next by Date: Drawing 1 pixel line with zoom change
  • Previous by thread: Re: Save dictionary to local file please help!
  • Next by thread: Re: Creating an NSInvocation from an NSMethodSignature
  • Index(es):
    • Date
    • Thread