On May 12, 2009, at 6:19 PM, Greg Parker wrote:
On May 12, 2009, at 6:43 AM, Michael Ash wrote:
Use -methodForSelector: to get the IMP for a nonexistent method. This
IMP will be a function pointer straight to the runtime's forwarding
machinery. Then install that IMP as the implementation for
On May 13, 2009, at 11:27 , Mike Mangino wrote:
I'm noticing something related that is causing my problems. I have
mocking working for custom types. When I try to change the class of
a string, however, I get a crash.
-(void) testImplementationOnString {
NSString *s = [NSString
On May 12, 2009, at 12:58 AM, Michael Ash wrote:
[snip]
My suggestion would be, if at all possible, avoid creating the
NSInvocation manually at all. By far the nicest way to create an
invocation is by capturing it using the -forwardInvocation: method.
That way you create it using the same
On May 12, 2009, at 9:43 AM, Michael Ash wrote:
[snip]
This is actually surprisingly easy.
(Caveat: I have not actually done this.)
Use -methodForSelector: to get the IMP for a nonexistent method. This
IMP will be a function pointer straight to the runtime's forwarding
machinery. Then
On Tue, May 12, 2009 at 11:13 AM, Mike Mangino
mmang...@elevatedrails.com wrote:
On May 12, 2009, at 9:43 AM, Michael Ash wrote:
[snip]
This is actually surprisingly easy.
(Caveat: I have not actually done this.)
Use -methodForSelector: to get the IMP for a nonexistent method. This
IMP
On May 12, 2009, at 6:43 AM, Michael Ash wrote:
Use -methodForSelector: to get the IMP for a nonexistent method. This
IMP will be a function pointer straight to the runtime's forwarding
machinery. Then install that IMP as the implementation for your
overridden methods. Callers will go straight
On Tue, May 12, 2009 at 6:19 PM, Greg Parker gpar...@apple.com wrote:
On May 12, 2009, at 6:43 AM, Michael Ash wrote:
Use -methodForSelector: to get the IMP for a nonexistent method. This
IMP will be a function pointer straight to the runtime's forwarding
machinery. Then install that IMP as
On Mon, May 11, 2009 at 9:04 AM, Mike Mangino
mmang...@elevatedrails.com wrote:
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