home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / ScrollingText / ScrollingText.m < prev    next >
Text File  |  1991-06-22  |  656b  |  30 lines

  1. /* ScrollingText.m
  2. *  Purpose: A subclass of Application and the class which runs the show.
  3. *
  4. *  You may freely copy, distribute, and reuse the code in this example.
  5. *  NeXT disclaims any warranty of any kind, expressed or  implied, as to its fitness
  6. *  for any particular use.
  7. *
  8. */
  9.  
  10. #import "ScrollingText.h"
  11. #import "Document.h"
  12.  
  13. @implementation ScrollingText : Application
  14.  
  15. - newDocument:sender
  16. {
  17.     id newDoc = [[Document alloc] init];
  18.     [newDoc center];
  19.     /* Without this explicit display of the window, */
  20.     /* the scroll bars will not appear at all. */
  21.     [newDoc display];  /* bug repellant */
  22.     [newDoc makeKeyAndOrderFront:nil];
  23.     return self;
  24. }
  25.  
  26. @end
  27.  
  28.  
  29.  
  30.