home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / Examples / AppKit / SimpleService / SimpleService_main.m < prev    next >
Text File  |  1997-01-12  |  600b  |  22 lines

  1. #import <Foundation/Foundation.h>
  2. #import "ServiceTest.h"
  3.  
  4. int main (int argc, const char *argv[]) {
  5.     NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  6.     ServiceTest *serviceProvider = [[ServiceTest alloc] init];
  7.     
  8.     NSRegisterServicesProvider(serviceProvider, @"SimpleService");
  9.  
  10.     NS_DURING
  11.         [[NSRunLoop currentRunLoop] run];
  12.     NS_HANDLER
  13.         NSLog(@"%@", localException);
  14.     NS_ENDHANDLER
  15.  
  16.     [serviceProvider release];
  17.     [pool release];
  18.  
  19.     exit(0);       // insure the process exit status is 0
  20.     return 0;      // ...and make main fit the ANSI spec.
  21. }
  22.