This is Resistor.m in view mode; [Download] [Up]
#import "Resistor.h" @implementation Resistor - (double)resistance {return resistance;} - setResistance:(double)value{ resistance=value; return self; } - compute { /* Here is where this object would "do its thing" based on the parameter values set via the inspector. In this example, we do nothing... */ return self; } - (const char *)getInspectorClassName { return "ResistorInspector"; } /* By returning this instances unique label, this instance will be handled individually by UHInspectorManager. */ - (const char *)getLabelForInspector { return [self label]; } - setLabel:(const char *)aString { if(label)NXZoneFree([self zone],label); label=NXCopyStringBufferFromZone(aString,[self zone]); return self; } - (const char *)label {return label;} @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.