This is ASCIIExampleClass.m in view mode; [Download] [Up]
/* ASCIIExampleClass.m
*
* This object controls the data of a beaker (molecules, cameras, groups etc.)
* It is the main document of BeakerBoy and controls everything from loading to
* setting up the browser which does most of the other work.
*
* For interface-info see the header file. The comments in this file mostly
* cover only the real implementation details.
*
* Written by: Thomas Engel
* Created: 23.10.1995 (Copyleft)
* Last modified: 12.11.1995
*/
#define CURRENT_VERSION 1.2
#import "ASCIIExampleClass.h"
#import <misckit/MiscString.h>
@implementation ASCIIExampleClass
+ initialize
{
if ( self == [ASCIIExampleClass class] )
[ASCIIExampleClass setVersion:CURRENT_VERSION];
return self;
}
- init
{
[super init];
return [self initFromText:[MiscString newWithString:"- myMethod:sender"]];
// BUG BUG..memory leak !
}
- initFromText:theLine
{
[super init];
name = [MiscString new];
[name takeStringValue:theLine];
[name replaceEveryOccurrenceOf:";" with:" "];
[name trimWhiteSpaces];
// Now charAt:0 _MUST_ be the mehtod type !!
selectorName = [name copy];
[selectorName replaceCharAt:0 withChar:' '];
[selectorName trimWhiteSpaces];
return self;
}
- free
{
[selectorName free];
return [super free];
}
- freeAll
{
// Ok now lets free it right away.
return self;
}
- (char *)name
{
return [name stringValue];
}
- (char *)selectorName
{
return [selectorName stringValue];
}
- (BOOL)isInstanceMethod
{
if( [name charAt:0] == '+' ) return NO;
return YES;
}
- (void *)doNothing:(int)right butWithSpeed:forTesting;
{
// stupid dummy !!!
}
@end
/*
* Hisory: 13.01.95 Buh
* And more one that can be found somewhere else all right ??
*
*
* Bugs: - ...
*/These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.