Skip to content

Commit

Permalink
Move NSInvocation category.
Browse files Browse the repository at this point in the history
  • Loading branch information
Owain R Hunt committed Apr 7, 2012
1 parent 75be291 commit 194bb82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion NSInvocation+blocks.h → Classes/NSInvocation+Blocks.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#import <Foundation/Foundation.h>

@interface NSInvocation (blocks)
@interface NSInvocation (Blocks)

/*
Usage example:
Expand Down
5 changes: 2 additions & 3 deletions NSInvocation+blocks.m → Classes/NSInvocation+Blocks.m
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Copyright (c) 2010 Jonathan 'Wolf' Rentzsch: http://rentzsch.com
// Some rights reserved: http://opensource.org/licenses/mit-license.php

#import "NSInvocation+blocks.h"
#import "NSInvocation+Blocks.h"

@interface JRInvocationGrabber : NSProxy {
id target;
Expand Down Expand Up @@ -32,15 +32,14 @@ - (void)forwardInvocation:(NSInvocation*)invocation_ {
- (void)dealloc {
self.target = nil;
self.invocation = nil;
[super dealloc];
}
@end


@implementation NSInvocation (jr_block)

+ (id)jr_invocationWithTarget:(id)target_ block:(void (^)(id target))block_ {
JRInvocationGrabber *grabber = [[[JRInvocationGrabber alloc] initWithTarget:target_] autorelease];
JRInvocationGrabber *grabber = [[JRInvocationGrabber alloc] initWithTarget:target_];
block_(grabber);
return grabber.invocation;
}
Expand Down

0 comments on commit 194bb82

Please sign in to comment.