home *** CD-ROM | disk | FTP | other *** search
-
- /* RemoteServer.m - written by Robert Vasvari 8/94 */
- #import <foundation/NSString.h>
- #import "Controller.h"
-
- #import "RemoteServer.h"
- #import "defs.h"
-
- @implementation RemoteServer
-
- /* the three utility methods */
- - init
- {
- id conn;
- NSString *n=[[NSString stringWithFormat:@"%sServer",
- [NXApp appName]] autorelease];
- [super init];
-
- /* advertise ourselves to whoever wants it
- through the nameserver */
- conn = [NXConnection registerRoot: self withName:[n cString]];
- [conn runFromAppKit];
- return self;
- }
-
- - doesNotRecognize:(SEL)aSelector
- { /* if an unknown message comes we should not blow up */
- [self error:" %s objects should not be sent '%s' messages\n",
- [[self class] name], sel_getName(_cmd)];
- return self;
- }
-
- - senderIsInvalid:sender
- {
- /* the server ran into a dead client */
- return self;
- }
-
- /* the remote methods */
- - hide:sender
- {
- [NXApp hide:sender];
- return self;
- }
-
- - newDocument:sender
- {
- [[NXApp delegate] newDocument:sender];
- return self;
- }
-
- - openDocument:(const char *)aPath
- {
- [[NXApp delegate] openDocument:aPath];
- return self;
- }
-
- @end
-