This is HashList.m in view mode; [Download] [Up]
// HashList.m -
#import "HashList.h"
@implementation HashList
+ new
{
self = [super new];
nameHash = [HashTable newKeyDesc:"*" valueDesc:"@"];
return self;
}
- insertObject:anObject at:(unsigned)index
{
[super insertObject:anObject at:index];
// don't change object's name!
if (*(((Item *)anObject)->name) != '\0')
[nameHash insertKey:((Item *)anObject)->name value:anObject];
}
@end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.