Fixing bugs. Outlets were not showing up in the inspector for custom classes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@15558 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2003-01-09 03:39:27 +00:00
parent 9dc8e5105c
commit 2d454a88de
4 changed files with 31 additions and 17 deletions

View file

@ -1,3 +1,18 @@
2003-01-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassManager.m: -[GormClassManager customClassForObject:]:
Added code to resolve the object being passed in to the name
which is used in the name table. This is for lookup in the
custom class map. This corrects a problem which was introduced
in the previous fix.
* GormInspectorsManager.m: in browser delegate. Removed code
which was looking up the name seperately. Now relies on code
added above.
* GormCustomClassInspector.m:
-[GormCustomClassInspector _setCurrentSelectionClassName:]:
Removed code which looks up the name. Now uses code in
GormClassManager.
2003-01-08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassManager.m: Added some NSDebugLog statements

View file

@ -298,7 +298,8 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
NSArray *actions;
Class theClass = [obj class];
NSString *customClassName = [self customClassForObject: obj];
NSDebugLog(@"** ACTIONS");
NSDebugLog(@"Object: %@",obj);
NSDebugLog(@"Custom class: %@",customClassName);
if(customClassName != nil)
@ -427,6 +428,9 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
Class theClass = [obj class];
NSString *customClassName = [self customClassForObject: obj];
NSDebugLog(@"** OUTLETS");
NSDebugLog(@"Object: %@",obj);
NSDebugLog(@"Custom class: %@",customClassName);
if(customClassName != nil)
{
// if the object has been mapped to a custom class, then
@ -1092,7 +1096,7 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
{
NSString *ssclass;
//NSLog(@"isSuperClass : %@, %@", superclass, subclass);
//NSDebugLog(@"isSuperClass : %@, %@", superclass, subclass);
if (superclass == nil || subclass == nil)
{
@ -1235,8 +1239,9 @@ NSString *IBClassNameChangedNotification = @"IBClassNameChangedNotification";
// custom class support...
- (NSString *) customClassForObject: (id)object
{
NSString *result = [customClassMap objectForKey: object];
NSDebugLog(@"in customClassForObject: object = %@, result = %@, customClassMap = %@",object, result, customClassMap);
NSString *name = [[(id<IB>)NSApp activeDocument] nameForObject: object];
NSString *result = [customClassMap objectForKey: name];
NSDebugLog(@"in customClassForObject: object = %@, name = %@, result = %@, customClassMap = %@",object, name, result, customClassMap);
return result;
}

View file

@ -67,11 +67,8 @@
- (void) _setCurrentSelectionClassName: (id)anobject
{
NSString *nameForObject = [_document nameForObject: anobject];
NSString *className = [_classManager customClassForObject: nameForObject];
NSDebugLog(@"name for object = %@, object = %@, className = %@",nameForObject, anobject, className);
// if no entry, then use the name of the class
NSString *className = [_classManager customClassForObject: anobject]; // nameForObject];
if([className isEqualToString: @""] ||
className == nil)
{

View file

@ -684,21 +684,16 @@ selectCellWithString: (NSString*)title
NSString *name = nil;
RELEASE(actions);
// get the name of the object...
name = [[(id<IB>)NSApp activeDocument] nameForObject: [con destination]];
actions = RETAIN([[NSApp classManager]
allActionsForObject: name]);
allActionsForObject: [con destination]]);
break;
}
}
if (con == nil)
{
NSString *name = [[(id<IB>)NSApp activeDocument] nameForObject:
[NSApp connectDestination]];
RELEASE(actions);
// get the name of the object...
actions = RETAIN([[NSApp classManager]
allActionsForObject: name]);
allActionsForObject: [NSApp connectDestination]]);
if ([actions count] > 0)
{
con = [NSNibControlConnector new];
@ -1042,6 +1037,7 @@ selectCellWithString: (NSString*)title
if (anObject != nil && anObject != object)
{
NSArray *array;
NSString *name;
ASSIGN(object, anObject);
DESTROY(currentConnector);
@ -1058,7 +1054,8 @@ selectCellWithString: (NSString*)title
[connectors addObjectsFromArray: array];
RELEASE(outlets);
outlets = RETAIN([[NSApp classManager] allOutletsForObject: object]);
// name = [[(id<IB>)NSApp activeDocument] nameForObject: object]; // get the name
outlets = RETAIN([[NSApp classManager] allOutletsForObject: object]); // name]); // object]);
DESTROY(actions);
[oldBrowser loadColumnZero];