This is Motorcycle.m in view mode; [Download] [Up]
/*-------------------------------------------------------------------------- * * You may freely copy, distribute, and reuse the code in this example. * SHL Systemhouse disclaims any warranty of any kind, expressed or * implied, as to its fitness for any particular use. * * * Motorcycle * * Inherits From: NSObject * * Conforms To: None * * Declared In: Motorcycle.h * * *------------------------------------------------------------------------*/ #import "Motorcycle.h" #import <foundation/NSString.h> #import <appkit/NXImage.h> #import <appkit/Application.h> @implementation Motorcycle /*-------------------------------------------------------------------------- * Initialization and Deallocation *------------------------------------------------------------------------*/ - init { [super init]; return self; } - (void) dealloc { [make release]; [model release]; [price release]; [picture free]; [super dealloc]; } /*-------------------------------------------------------------------------- * Accessors *------------------------------------------------------------------------*/ - make { return make; } - model { return model; } - price { return price; } - picture { return picture; } - (void) setMake: (NSString *) aString { [make autorelease]; make = [aString retain]; } - (void) setModel: (NSString *) aString { [model autorelease]; model = [aString retain]; } - (void) setPrice: (NSString *) aString { [price autorelease]; price = [aString retain]; } - (void) setPicture: (NXImage *) anImage { [picture free]; picture = anImage; } @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.