home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1995 August / NEBULA.mdf / Apps / DevTools / MachOViewer / Source / RCS / Document.m,v < prev    next >
Encoding:
Text File  |  1994-01-30  |  1.6 KB  |  108 lines

  1. head     1.2;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ediger:1.2;
  6. comment  @@;
  7.  
  8.  
  9. 1.2
  10. date     94.01.30.16.24.54;  author ediger;  state Exp;
  11. branches ;
  12. next     1.1;
  13.  
  14. 1.1
  15. date     93.12.19.13.08.17;  author ediger;  state Exp;
  16. branches ;
  17. next     ;
  18.  
  19.  
  20. desc
  21. @Class definition for "file's owner" of a Mach-O file on-screen display
  22. @
  23.  
  24.  
  25. 1.2
  26. log
  27. @debug printf statement correction
  28. @
  29. text
  30. @
  31. /* Generated by Interface Builder */
  32.  
  33. #import "Document.h"
  34. #import <appkit/Application.h>
  35. #import <appkit/Window.h>
  36.  
  37. /* $Log:    Document.m,v $
  38. Revision 1.1  93/12/19  13:08:17  ediger
  39. Initial revision
  40.  
  41.  */
  42.  
  43. static char rcsident[] = "$Id: Document.m,v 1.1 93/12/19 13:08:17 ediger Exp Locker: ediger $";
  44.  
  45. @@implementation Document
  46.  
  47. - init
  48. {
  49.     D(printf("Document -init\n");)
  50.  
  51.     [super init];
  52.     [NXApp loadNibSection:"Document.nib" owner:self];
  53.  
  54.     return self;
  55. }
  56.  
  57. - openFileNamed:(char *)path
  58. {
  59.     D(printf("Document -openFileNamed:\"%s\"\n", path);)
  60.  
  61.     if (fileRep != Nil)
  62.     {    char  cBuf[256];
  63.         char *pcType;
  64.  
  65.         [fileRep openFileNamed:path];
  66.         pcType = [fileRep fileType];
  67.         
  68.         if (NULL == pcType)
  69.             sprintf(cBuf, "%s", (rindex(path, '/') + 1));
  70.         else
  71.             sprintf(cBuf, "%s - %s", (rindex(path, '/') + 1), pcType);
  72.  
  73.         [viewWindow setTitle:cBuf];
  74.     } else
  75.         fprintf(stderr, "Document -openFile:, fileRep is Nil\n");
  76.  
  77.     return self;
  78. }
  79.  
  80.  
  81. - show:sender
  82. {
  83.     D(printf("Document -show:%x\n", (unsigned int)sender);)
  84.     [viewWindow makeKeyAndOrderFront:self];
  85.     return self;
  86. }
  87.  
  88.  
  89. @@end
  90. @
  91.  
  92.  
  93. 1.1
  94. log
  95. @Initial revision
  96. @
  97. text
  98. @d8 4
  99. a11 1
  100. /* $Log$
  101. d14 1
  102. a14 1
  103. static char rcsident[] = "$Id$";
  104. d54 1
  105. a54 1
  106.     D(printf("Document -sender:%x\n", (unsigned int)sender);)
  107. @
  108.