home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- #import "Document.h"
- #import <appkit/Application.h>
- #import <appkit/Window.h>
-
- /* $Log: Document.m,v $
- Revision 1.2 94/01/30 16:24:54 ediger
- debug printf statement correction
-
- Revision 1.1 93/12/19 13:08:17 ediger
- Initial revision
-
- */
-
- static char rcsident[] = "$Id: Document.m,v 1.2 94/01/30 16:24:54 ediger Exp Locker: ediger $";
-
- @implementation Document
-
- - init
- {
- D(printf("Document -init\n");)
-
- [super init];
- [NXApp loadNibSection:"Document.nib" owner:self];
-
- return self;
- }
-
- - openFileNamed:(char *)path
- {
- D(printf("Document -openFileNamed:\"%s\"\n", path);)
-
- if (fileRep != Nil)
- { char cBuf[256];
- char *pcType;
-
- [fileRep openFileNamed:path];
- pcType = [fileRep fileType];
-
- if (NULL == pcType)
- sprintf(cBuf, "%s", (rindex(path, '/') + 1));
- else
- sprintf(cBuf, "%s - %s", (rindex(path, '/') + 1), pcType);
-
- [viewWindow setTitle:cBuf];
- } else
- fprintf(stderr, "Document -openFile:, fileRep is Nil\n");
-
- return self;
- }
-
-
- - show:sender
- {
- D(printf("Document -show:%x\n", (unsigned int)sender);)
- [viewWindow makeKeyAndOrderFront:self];
- return self;
- }
-
-
- @end
-