This is Tee.rtf in view mode; [Download] [Up]
Copyright (C) 1992 Dimitri Tischenko & P.B. Schuller, special thanks to Scott Hess Tee INHERITS FROM Object DECLARED IN Tee.h CLASS DESCRIPTION Tee is created in analogy with the Unix(tm) tee command. Tee permits connecting an action to more than one object. To use Tee, you have to incorporate Tee in your project, instantiate it, and connect the action which you want to duplicate to the tee instance. Then connect the two outlets of the tee instance to the target objects. INSTANCE VARIABLES Inherited from Object Class isa; Declared in Tee id target1; id target2; You can add more targets, if you wish to be able to connect to more than two objects, but you will have to change the methods as well. INSTANCE METHODS forward:: - forward:(SEL)aSelector :(marg_list)argFrame Sends aSelector to the outlets with arguments argFrame. If an outlet is another Tee instance, forwards the message; if not, performs it. respondsTo: - (BOOL)respondsTo:(SEL)aSelector Returns YES always. This seems to work best. In the header file, Tee.h, I've declared four take...ValueFrom methods. This is not necessary, but is handy when you parse the class into Interface Builder. You can also add more methods to the header file or directly into Interface Builder. Being a NeXT-rookie, I realize that Tee is far from perfect. All suggestions for enhancement are welcome!
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.