Various fixes.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21496 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2005-07-17 19:04:52 +00:00
parent 59330879dd
commit 0e96a7e16b
4 changed files with 40 additions and 16 deletions

View file

@ -1,3 +1,13 @@
2005-07-17 15:08 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormClassEditor.m: Removed AUTORELEASE for
subClassesArray, it was causing a crash.
* GormCore/GormClassInspector.m: setObject: conditional which
prints a warning if a non-GormClassProxy class is passed in.
* GormCore/GormPrivate.m: initWithClassName: conditional which
prints a warning if a non-string is used to initialize th
GormClassProxy.
2005-07-17 08:42 Gregory John Casamento <greg_casamento@yahoo.com>
* GormCore/GormInternalViewEditor.m: -init, prepareForDragOperation:,

View file

@ -299,7 +299,7 @@ NSString *GormSwitchViewPreferencesNotification = @"GormSwitchViewPreferencesNot
}
// select class in browser...
subClassesArray = AUTORELEASE([[classManager allSuperClassesOf: className] mutableCopy]);
subClassesArray = [[classManager allSuperClassesOf: className] mutableCopy];
if ((subClassesArray == nil || [subClassesArray count] == 0) &&
[classManager isRootClass: className] == NO)
{

View file

@ -632,20 +632,27 @@ objectValueForTableColumn: (NSTableColumn *)tc
int actionsCount = 0;
NSTabViewItem *item = nil;
[super setObject: anObject];
ASSIGN(classManager, [(id<Gorm>)NSApp classManager]);
ASSIGN(currentClass, [object className]);
outletsCount = [[classManager allOutletsForClassNamed: currentClass] count];
actionsCount = [[classManager allActionsForClassNamed: currentClass] count];
item = [tabView tabViewItemAtIndex: 1]; // actions;
[item setLabel: [NSString stringWithFormat: @"Actions (%d)",actionsCount]];
item = [tabView tabViewItemAtIndex: 0]; // outlets;
[item setLabel: [NSString stringWithFormat: @"Outlets (%d)",outletsCount]];
[tabView setNeedsDisplay: YES];
[self _refreshView];
if([anObject isKindOfClass: [GormClassProxy class]])
{
[super setObject: anObject];
ASSIGN(classManager, [(id<Gorm>)NSApp classManager]);
ASSIGN(currentClass, [object className]);
outletsCount = [[classManager allOutletsForClassNamed: currentClass] count];
actionsCount = [[classManager allActionsForClassNamed: currentClass] count];
item = [tabView tabViewItemAtIndex: 1]; // actions;
[item setLabel: [NSString stringWithFormat: @"Actions (%d)",actionsCount]];
item = [tabView tabViewItemAtIndex: 0]; // outlets;
[item setLabel: [NSString stringWithFormat: @"Outlets (%d)",outletsCount]];
[tabView setNeedsDisplay: YES];
[self _refreshView];
}
else
{
NSLog(@"Got %@ set to class edit inspector");
}
}
- (NSString *) _currentClass

View file

@ -192,7 +192,14 @@ static BOOL _illegalClassSubstitution = NO;
self = [super init];
if (self != nil)
{
ASSIGN(name, n);
if([n isKindOfClass: [NSString class]])
{
ASSIGN(name, n);
}
else
{
NSLog(@"Attempt to add a class proxy with className=%@",n);
}
}
return self;
}