Minor cleanups.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@18775 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-03-05 05:46:39 +00:00
parent a8dbad29aa
commit 275c882a41
4 changed files with 35 additions and 26 deletions

View file

@ -1,4 +1,11 @@
2004-03-04 10:54 Gregory John Casamento <greg_casamento@yahoo.com>
2004-03-05 00:54 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCustomClassInspector.m: Added an "if" in setObject: to
prevent any problems if the object passed in is nil.
* GormDocument.m: minor cleanup.
* GormFilesOwner.m: minor cleanup.
2004-03-04 22:54 Gregory John Casamento <greg_casamento@yahoo.com>
* GormFilesOwner.m: -[GormFilesOwner init] changed the dimensions
of browser. Also made it so that the inspector shows up in

View file

@ -80,32 +80,34 @@
- (void) setObject: (id)anObject
{
NSMutableArray *classes = nil;
[super setObject: anObject];
_document = [(Gorm *)NSApp activeDocument];
_classManager = [(Gorm *)NSApp classManager];
// get the information...
NSDebugLog(@"Current selection %@", [self object]);
[self _setCurrentSelectionClassName: [self object]];
// load the array...
[browser loadColumnZero];
// get a list of all of the classes allowed and the class to be shown
// and select the appropriate row in the inspector...
classes = [NSMutableArray arrayWithObject: _parentClassName];
[classes addObjectsFromArray: [_classManager allCustomSubclassesOf: _parentClassName]];
_rowToSelect = [classes indexOfObject: _currentSelectionClassName];
_rowToSelect = (_rowToSelect != NSNotFound)?_rowToSelect:0;
if(_rowToSelect != NSNotFound)
if(anObject != nil)
{
[browser selectRow: _rowToSelect inColumn: 0];
NSMutableArray *classes = nil;
[super setObject: anObject];
_document = [(Gorm *)NSApp activeDocument];
_classManager = [(Gorm *)NSApp classManager];
// get the information...
NSDebugLog(@"Current selection %@", [self object]);
[self _setCurrentSelectionClassName: [self object]];
// load the array...
[browser loadColumnZero];
// get a list of all of the classes allowed and the class to be shown
// and select the appropriate row in the inspector...
classes = [NSMutableArray arrayWithObject: _parentClassName];
[classes addObjectsFromArray: [_classManager allCustomSubclassesOf: _parentClassName]];
_rowToSelect = [classes indexOfObject: _currentSelectionClassName];
_rowToSelect = (_rowToSelect != NSNotFound)?_rowToSelect:0;
if(_rowToSelect != NSNotFound)
{
[browser selectRow: _rowToSelect inColumn: 0];
}
}
[browser setNeedsDisplay: YES];
}
- (void) awakeFromNib

View file

@ -2796,6 +2796,7 @@ static NSImage *classesImage = nil;
archiver = [[NSArchiver alloc] initForWritingWithMutableData: archiverData];
/* Special gorm classes to their archive equivalents. */
// see implementation of classForCoder for GSNibContainer.
[archiver encodeClassName: @"GormObjectProxy"
intoClassName: @"GSNibItem"];
[archiver encodeClassName: @"GormCustomView"

View file

@ -59,7 +59,6 @@
- (NSString*) inspectorClassName
{
// return @"GormNotApplicableInspector";
return @"GormFilesOwnerInspector";
}