mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
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:
parent
6be559f890
commit
68ef08b403
3 changed files with 36 additions and 22 deletions
|
@ -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>
|
||||
|
||||
* GormDocument.m: Changed implementation here to call the one
|
||||
|
|
|
@ -291,6 +291,7 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
[outletTable setDataSource: outletData];
|
||||
[parentClass setDataSource: parentClassData];
|
||||
[parentClass setDoubleAction: @selector(selectClass:)];
|
||||
[parentClass setTarget: self];
|
||||
|
||||
// delegate...
|
||||
[actionTable setDelegate: self];
|
||||
|
@ -471,26 +472,34 @@ objectValueForTableColumn: (NSTableColumn *)tc
|
|||
{
|
||||
NSArray *list = [classManager allClassNames];
|
||||
int row = [parentClass selectedRow];
|
||||
NSString *newParent = [list objectAtIndex: row];
|
||||
NSString *name = [self _currentClass];
|
||||
BOOL removed = NO;
|
||||
GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument];
|
||||
|
||||
// check to see if the user wants to do this and remove the connections.
|
||||
removed = [document removeConnectionsForClassNamed: name];
|
||||
|
||||
// if removed, move the class and notify...
|
||||
if(removed)
|
||||
if(row >= 0)
|
||||
{
|
||||
NSString *oldSuper = [classManager superClassNameForClassNamed: name];
|
||||
NSString *newParent = [list objectAtIndex: row];
|
||||
NSString *name = [self _currentClass];
|
||||
BOOL removed = NO;
|
||||
GormDocument *document = (GormDocument *)[(id <IB>)NSApp activeDocument];
|
||||
|
||||
[classManager setSuperClassNamed: newParent forClassNamed: name];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[document collapseClass: oldSuper];
|
||||
[document collapseClass: name];
|
||||
[document reloadClasses];
|
||||
[document selectClass: name];
|
||||
// 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.
|
||||
removed = [document removeConnectionsForClassNamed: name];
|
||||
|
||||
// if removed, move the class and notify...
|
||||
if(removed)
|
||||
{
|
||||
NSString *oldSuper = [classManager superClassNameForClassNamed: name];
|
||||
|
||||
[classManager setSuperClassNamed: newParent forClassNamed: name];
|
||||
[nc postNotificationName: IBInspectorDidModifyObjectNotification
|
||||
object: classManager];
|
||||
[document collapseClass: oldSuper];
|
||||
[document collapseClass: name];
|
||||
[document reloadClasses];
|
||||
[document selectClass: name];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -138,6 +138,10 @@ static NSMapTable *docMap = 0;
|
|||
return NO;
|
||||
}
|
||||
|
||||
- (void) pasteInSelection
|
||||
{
|
||||
}
|
||||
|
||||
- (void) copySelection
|
||||
{
|
||||
if (selected != nil)
|
||||
|
@ -433,11 +437,6 @@ static NSMapTable *docMap = 0;
|
|||
[super mouseDown: theEvent];
|
||||
}
|
||||
|
||||
|
||||
- (void) pasteInSelection
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL) performDragOperation: (id<NSDraggingInfo>)sender
|
||||
{
|
||||
if (dragType == IBObjectPboardType)
|
||||
|
|
Loading…
Reference in a new issue