Change to correct some crashes which I just detected

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@20462 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2004-12-18 02:29:31 +00:00
parent 6be559f890
commit 68ef08b403
3 changed files with 36 additions and 22 deletions

View file

@ -1,3 +1,9 @@
2004-12-17 21:28 Gregory John Casamento <greg_casamento@yahoo.com>
* GormClassInspector.m: Set the double action and target
for parentClass.
* GormObjectEditor.m: Moved the pasteInSelection method.
2004-12-17 05:48 Gregory John Casamento <greg_casamento@yahoo.com> 2004-12-17 05:48 Gregory John Casamento <greg_casamento@yahoo.com>
* GormDocument.m: Changed implementation here to call the one * GormDocument.m: Changed implementation here to call the one

View file

@ -291,6 +291,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
[outletTable setDataSource: outletData]; [outletTable setDataSource: outletData];
[parentClass setDataSource: parentClassData]; [parentClass setDataSource: parentClassData];
[parentClass setDoubleAction: @selector(selectClass:)]; [parentClass setDoubleAction: @selector(selectClass:)];
[parentClass setTarget: self];
// delegate... // delegate...
[actionTable setDelegate: self]; [actionTable setDelegate: self];
@ -471,11 +472,17 @@ objectValueForTableColumn: (NSTableColumn *)tc
{ {
NSArray *list = [classManager allClassNames]; NSArray *list = [classManager allClassNames];
int row = [parentClass selectedRow]; int row = [parentClass selectedRow];
if(row >= 0)
{
NSString *newParent = [list objectAtIndex: row]; NSString *newParent = [list objectAtIndex: row];
NSString *name = [self _currentClass]; NSString *name = [self _currentClass];
BOOL removed = NO; BOOL removed = NO;
GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument]; GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument];
// if it's a custom class, let it go, if not do nothing.
if([classManager isCustomClass: name])
{
// check to see if the user wants to do this and remove the connections. // check to see if the user wants to do this and remove the connections.
removed = [document removeConnectionsForClassNamed: name]; removed = [document removeConnectionsForClassNamed: name];
@ -492,6 +499,8 @@ objectValueForTableColumn: (NSTableColumn *)tc
[document reloadClasses]; [document reloadClasses];
[document selectClass: name]; [document selectClass: name];
} }
}
}
} }
- (void) changeClassName: (id)sender - (void) changeClassName: (id)sender

View file

@ -138,6 +138,10 @@ static NSMapTable *docMap = 0;
return NO; return NO;
} }
- (void) pasteInSelection
{
}
- (void) copySelection - (void) copySelection
{ {
if (selected != nil) if (selected != nil)
@ -433,11 +437,6 @@ static NSMapTable *docMap = 0;
[super mouseDown: theEvent]; [super mouseDown: theEvent];
} }
- (void) pasteInSelection
{
}
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender - (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
{ {
if (dragType == IBObjectPboardType) if (dragType == IBObjectPboardType)