This is MiscInspectorWrapper.m in view mode; [Download] [Up]
/* MiscInspectorWrapper.m * * This is a class that allows a simple collection of single inspectors that * work one the same type of data. To the manager they all appear as one * mulitpurpose inspector. * * For more interface-info see the header file. In depth information * can be found here in the source-code. * * Written by: Thomas Engel * Created: 08.02.1994 (Copyleft) * Last modified: 24.02.1994 * * Copyright (c) 1995 Thomas Engel */ //#import "MiscInspectorWrapper.h" //#import "MiscInspector.h" #import <misckit/MiscSwapView.h> #import <misckit/misckit.h> @implementation MiscInspectorWrapper - (BOOL)doesHandleSelection { // Because we are not able to load a default NIB will we'll return NO // by default here. // Your subclass has to do some work here return NO; } - setManager:anObject { manager = anObject; [manager addInspector:self]; return self; } - addInspector:anInspector { // We don't add the inspector to the real manager but only to our // controller list. After we have done so we can inform the single // inspector(controller) who the real manager is. But then he will not // register automatically! No now and not in the future. if( !controllers ) controllers = [List new]; [controllers addObject:anInspector]; [anInspector setManager:manager registerSelf:NO]; return self; } - addWrappedControllers { // Let get the real swapView and add all our controllers id swapView; int i; swapView = [manager swapView]; for( i=0; i<[controllers count]; i++ ) [swapView addController:[controllers objectAt:i]]; return self; } - window { return [manager window]; } - okButton { return [manager okButton]; } - revertButton { return [manager revertButton]; } - selection { return [manager selection]; } - (unsigned)selectionCount { return [manager selectionCount]; } @end /* * History: 24.02.94 Added the selection etc methods. * * 08.02.94 First code entered. * * * Bugs: - no read/write; * * - addInspector might cause some problems if the controllers register * befoe the real manager has registered. * Not really a big deal because this can only happen when we use * wrappers inside a NIB that also contains the inspectorManager. * This is useless because we have created wrappers to work a NIB * wrappers in some way and doesHandle load the NIB so the manager * definitly will be valid...when you use this object as intended. */
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.