home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / EODEV.Z / Product.m < prev    next >
Encoding:
Text File  |  1996-08-23  |  797 b   |  35 lines

  1. /*
  2.         Copyright (c) 1996, NeXT Software, Inc.
  3.         All rights reserved.
  4.  
  5.         You may freely copy, distribute and reuse the code in this example.
  6.         NeXT disclaims any warranty of any kind, expressed or implied,
  7.         as to its fitness for any particular use.
  8. */
  9. #import <BusinessLogic/Product.h>
  10.  
  11. @implementation Product
  12.  
  13. - (id)rentalTerms
  14. {
  15.     return rentalTerms;
  16. }
  17.  
  18. - (NSString *)name
  19. {
  20.     [NSException raise:NSInvalidArgumentException format:@"-%@ cannot be sent to an abstract object of class %@.", NSStringFromSelector(_cmd), [[self class] name]];
  21.     
  22.     return nil; // Just to keep the compiler happy.
  23. }
  24.  
  25. - (void)dealloc
  26. {
  27.     [units autorelease];
  28.     [rentalTerms autorelease];
  29.     [super dealloc];
  30. }
  31.  
  32. - (NSString *)description { return [self eoDescription]; }
  33.  
  34. @end
  35.