This is BBSuitcase.m in view mode; [Download] [Up]
/* BBSuitcase.m * * This is my subclass of the IKFolder to allow browsing suitcases like * the folder objects. (some kind of custom IKSuitcase) * * For interface-info see the header file. The comments in this file mostly * cover only the real implementation details. * * Written by: Thomas Engel * Created: 02.05.1994 (Copyleft) * Last modified: 02.05.1994 */ #import "BBSuitcase.h" @implementation BBSuitcase - init { self = [super init]; if( !self ) return self; // OK. We really are an object...just set the new icon. [self setDragAccepting:NO]; return self; } - forward:(SEL) message:(marg_list)argFrame { if( [children respondsTo:message] ) return [children performv:message :argFrame]; return [super forward:message :argFrame]; } - freeObject { [children freeObjects]; // BUG BUG BUG return self; } - (unsigned)count { return [children count]; } - objectAt:(unsigned)index { return [children objectAt:index]; } - addObject:anObject { return [self addChild:anObject]; } - addObjectIfAbsent:anObject { // We will only add this child if we do not allready own it. if( [children indexOf:anObject] != NX_NOT_IN_LIST ) return self; return [self addChild:anObject]; } - empty { [children empty]; // Bug BUG BUG return self; } @end /* * History: 17.05.94 Added ifAbsent: * * 02.05.94 Just got it working to get some feeling for the app. * * * Bugs: - Ok could be a List with all the features...but I don't need them * right now. */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.