jens@0: // jens@0: // Target.h jens@0: // MYUtilities jens@0: // jens@0: // Created by Jens Alfke on 2/11/08. jens@0: // Copyright 2008 Jens Alfke. All rights reserved. jens@0: // jens@0: jens@11: #import jens@0: jens@0: jens@7: @interface MYTarget : NSObject jens@7: { jens@7: id _invocations; // May be an NSInvocation, or an NSMutableArray of them jens@7: } jens@0: jens@7: + (MYTarget*) targetWithReceiver: (id)receiver action: (SEL)action; jens@0: jens@7: - (void) addTarget: (MYTarget*)target; jens@0: jens@7: - (id) invokeWithSender: (id)sender; jens@7: jens@7: @end jens@7: jens@7: jens@7: #define $target(RCVR,METHOD) [MYTarget targetWithReceiver: (RCVR) action: @selector(METHOD)]