author | Jens Alfke <jens@mooseyard.com> |
Sun Jul 13 10:45:42 2008 -0700 (2008-07-13) | |
changeset 16 | ce9c83f7ec14 |
parent 7 | 59addced5e2a |
permissions | -rw-r--r-- |
jens@0 | 1 |
// |
jens@0 | 2 |
// Target.h |
jens@0 | 3 |
// MYUtilities |
jens@0 | 4 |
// |
jens@0 | 5 |
// Created by Jens Alfke on 2/11/08. |
jens@0 | 6 |
// Copyright 2008 Jens Alfke. All rights reserved. |
jens@0 | 7 |
// |
jens@0 | 8 |
|
jens@11 | 9 |
#import <Foundation/Foundation.h> |
jens@0 | 10 |
|
jens@0 | 11 |
|
jens@7 | 12 |
@interface MYTarget : NSObject |
jens@7 | 13 |
{ |
jens@7 | 14 |
id _invocations; // May be an NSInvocation, or an NSMutableArray of them |
jens@7 | 15 |
} |
jens@0 | 16 |
|
jens@7 | 17 |
+ (MYTarget*) targetWithReceiver: (id)receiver action: (SEL)action; |
jens@0 | 18 |
|
jens@7 | 19 |
- (void) addTarget: (MYTarget*)target; |
jens@0 | 20 |
|
jens@7 | 21 |
- (id) invokeWithSender: (id)sender; |
jens@7 | 22 |
|
jens@7 | 23 |
@end |
jens@7 | 24 |
|
jens@7 | 25 |
|
jens@7 | 26 |
#define $target(RCVR,METHOD) [MYTarget targetWithReceiver: (RCVR) action: @selector(METHOD)] |