mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
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:
parent
562eee3f9c
commit
9ca5ae8069
3 changed files with 25 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -66,9 +66,10 @@
|
|||
|
||||
- (void) _setCurrentSelectionClassName: (id)anobject
|
||||
{
|
||||
NSString *className;
|
||||
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
|
||||
|
@ -87,14 +96,15 @@
|
|||
_document = [(Gorm *)NSApp activeDocument];
|
||||
_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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue