Target.h
author Jens Alfke <jens@mooseyard.com>
Sat May 17 13:14:48 2008 -0700 (2008-05-17)
changeset 9 823e7e74088e
parent 0 d84d25d6cdbb
child 11 e5976864dfe9
permissions -rw-r--r--
* Assert macros now put the failure code in a separate segment.
* Added $string utility.
     1 //
     2 //  Target.h
     3 //  MYUtilities
     4 //
     5 //  Created by Jens Alfke on 2/11/08.
     6 //  Copyright 2008 Jens Alfke. All rights reserved.
     7 //
     8 
     9 #import <Cocoa/Cocoa.h>
    10 
    11 
    12 @interface MYTarget : NSObject
    13 {
    14     id _invocations;    // May be an NSInvocation, or an NSMutableArray of them
    15 }
    16 
    17 + (MYTarget*) targetWithReceiver: (id)receiver action: (SEL)action;
    18 
    19 - (void) addTarget: (MYTarget*)target;
    20 
    21 - (id) invokeWithSender: (id)sender;
    22 
    23 @end
    24 
    25 
    26 #define $target(RCVR,METHOD)    [MYTarget targetWithReceiver: (RCVR) action: @selector(METHOD)]