Correction for report #7938 and minor cleanup.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18720 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-02-29 16:52:30 +00:00
parent 562eee3f9c
commit 9ca5ae8069
3 changed files with 25 additions and 6 deletions

View file

@ -1,3 +1,11 @@
2004-02-29 11:56 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCustomClassInspector.m: -[GormCustomClassInspector setObject:]
corrected Report #7938. Inspector now properly selects the subclass
of the object when the .gorm is initially loaded.
* GormInspectorsManager.m: Removed some uneeded calls to
"establishConnection".
2004-02-23 23:56 Gregory John Casamento <greg_casamento@yahoo.com>
* ClassInformation.plist: reformatted and added/removed some

View file

@ -67,8 +67,9 @@
- (void) _setCurrentSelectionClassName: (id)anobject
{
NSString *className;
NSMutableArray *classes = nil;
className = [_classManager customClassForObject: anobject]; // nameForObject];
className = [_classManager customClassForObject: anobject];
if ([className isEqualToString: @""]
|| className == nil)
{
@ -79,6 +80,14 @@
[GormClassManager correctClassName: className]);
ASSIGN(_parentClassName,
[GormClassManager correctClassName: NSStringFromClass([anobject class])]);
// get a list of all of the classes allowed and the class to be shown.
classes = [NSMutableArray arrayWithObject: _parentClassName];
[classes addObjectsFromArray: [_classManager allCustomSubclassesOf: _parentClassName]];
// select the appropriate row in the inspector...
_rowToSelect = [classes indexOfObject: className];
_rowToSelect = (_rowToSelect != NSNotFound)?_rowToSelect:0;
}
- (void) setObject: (id)anObject
@ -88,13 +97,14 @@
_classManager = [(Gorm *)NSApp classManager];
_currentSelection = anObject;
[browser loadColumnZero];
NSDebugLog(@"Current selection %@", _currentSelection);
[self _setCurrentSelectionClassName: _currentSelection];
[browser reloadColumn: 0];
// select the class...
[browser selectRow: _rowToSelect inColumn: 0];
[browser setNeedsDisplay: YES];
}
@ -102,6 +112,7 @@
{
[browser setTarget: self];
[browser setAction: @selector(select:)];
[browser reloadColumn: 0];
}
- (void) _replaceCellClassForObject: (id)obj

View file

@ -1071,7 +1071,7 @@ selectCellWithString: (NSString*)title
[localException reason]];
// get rid of the bad connector and recover.
[currentConnector setDestination: nil];
[currentConnector establishConnection];
// [currentConnector establishConnection];
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
NSRunAlertPanel(_(@"Problem making connection"), msg,
_(@"OK"),nil,nil,nil);
@ -1132,7 +1132,7 @@ selectCellWithString: (NSString*)title
[localException reason]];
// get rid of the bad connector and recover.
[currentConnector setDestination: nil];
[currentConnector establishConnection];
// [currentConnector establishConnection];
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
NSRunAlertPanel(_(@"Problem making connection"), msg,
_(@"OK"),nil,nil,nil);