This is STAppServer.m in view mode; [Download] [Up]
/* STAppServer.m - written by Phillip Zakhour/Robert Vasvari 1/95 */ #import <appkit/appkit.h> #import <foundation/NSString.h> #import "STAppServer.h" #import "STAppController.h" #import "STRemoteMethodCategory.h" @implementation STAppServer - init { id conn; NSString *n=[NSString stringWithFormat:@"%s",[(Application *)NXApp appName]]; [super init]; /* export ourselves to whoever wants it */ conn = [NXConnection registerRoot: self withName:[n cString]]; [conn runFromAppKit]; return self; } - (oneway)hide { [NXApp hide:self]; } - (oneway)quit { [NXApp terminate:self]; } - (NSString *)appName; { return [NSString stringWithCString:[(Application *)NXApp appName]]; } /* * Methods that implement the NXSenderIsInvalid protocol */ - senderIsInvalid:sender { /* the server ran into a dead client */ return self; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.