mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-24 03:51:22 +00:00
Some fixes
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17820 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
458a9f2d39
commit
7c8894276f
4 changed files with 33 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2003-10-12 01:49 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
|
* GormDocument.m: Added code to help with copy/paste issue.
|
||||||
|
* GormInspectorsManager.m: Added code to do addional checks to
|
||||||
|
ensure that the user cannot make erroneous connections.
|
||||||
|
|
||||||
2003-10-08 01:03 Gregory John Casamento <greg_casamento@yahoo.com>
|
2003-10-08 01:03 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* GormDocument.m: Added include for GSNibTemplates.h removed some
|
* GormDocument.m: Added include for GSNibTemplates.h removed some
|
||||||
|
|
4
Gorm.m
4
Gorm.m
|
@ -517,9 +517,9 @@ NSString *GormDidDeleteClassNotification = @"GormDidDeleteClassNotification";
|
||||||
forKey: @"ApplicationName"];
|
forKey: @"ApplicationName"];
|
||||||
[dict setObject: @"[GNUstep | Graphical] Object Relationship Modeller"
|
[dict setObject: @"[GNUstep | Graphical] Object Relationship Modeller"
|
||||||
forKey: @"ApplicationDescription"];
|
forKey: @"ApplicationDescription"];
|
||||||
[dict setObject: @"Gorm 0.4.0 (Beta)"
|
[dict setObject: @"Gorm 0.4.1 (Beta)"
|
||||||
forKey: @"ApplicationRelease"];
|
forKey: @"ApplicationRelease"];
|
||||||
[dict setObject: @"0.4.0 Oct 01 2003"
|
[dict setObject: @"0.4.1 Oct 12 2003"
|
||||||
forKey: @"FullVersionID"];
|
forKey: @"FullVersionID"];
|
||||||
[dict setObject: [NSArray arrayWithObjects: @"Gregory John Casamento <greg_casamento@yahoo.com>",
|
[dict setObject: [NSArray arrayWithObjects: @"Gregory John Casamento <greg_casamento@yahoo.com>",
|
||||||
@"Richard Frith-Macdonald <rfm@gnu.org>",
|
@"Richard Frith-Macdonald <rfm@gnu.org>",
|
||||||
|
|
|
@ -575,7 +575,8 @@ static NSImage *classesImage = nil;
|
||||||
NSEnumerator *enumerator;
|
NSEnumerator *enumerator;
|
||||||
NSMutableSet *editors;
|
NSMutableSet *editors;
|
||||||
id obj;
|
id obj;
|
||||||
NSData *data;
|
NSMutableData *data;
|
||||||
|
NSArchiver *archiver;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove all editors from the selected objects before archiving
|
* Remove all editors from the selected objects before archiving
|
||||||
|
@ -593,7 +594,15 @@ static NSImage *classesImage = nil;
|
||||||
[editor deactivate];
|
[editor deactivate];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = [NSArchiver archivedDataWithRootObject: anArray];
|
|
||||||
|
// encode the data
|
||||||
|
data = [NSMutableData dataWithCapacity: 0];
|
||||||
|
archiver = [[NSArchiver alloc] initForWritingWithMutableData: data];
|
||||||
|
[archiver encodeClassName: @"GormCustomView"
|
||||||
|
intoClassName: @"GSCustomView"];
|
||||||
|
[archiver encodeRootObject: anArray];
|
||||||
|
|
||||||
|
// reactivate
|
||||||
enumerator = [editors objectEnumerator];
|
enumerator = [editors objectEnumerator];
|
||||||
while ((obj = [enumerator nextObject]) != nil)
|
while ((obj = [enumerator nextObject]) != nil)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1067,7 +1067,19 @@ selectCellWithString: (NSString*)title
|
||||||
if ([[currentConnector source] isKindOfClass:
|
if ([[currentConnector source] isKindOfClass:
|
||||||
[GormObjectProxy class]] == NO)
|
[GormObjectProxy class]] == NO)
|
||||||
{
|
{
|
||||||
|
// prevent invalid connections from being made...
|
||||||
|
NS_DURING
|
||||||
[currentConnector establishConnection];
|
[currentConnector establishConnection];
|
||||||
|
NS_HANDLER
|
||||||
|
NSString *msg = [NSString stringWithFormat: @"Cannot establish connection: %@",
|
||||||
|
[localException reason]];
|
||||||
|
// get rid of the bad connector and recover.
|
||||||
|
[[currentConnector source] setTarget: nil]; // unset these values on the source.
|
||||||
|
[[currentConnector source] setAction: nil]; // ibid.
|
||||||
|
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
|
||||||
|
NSRunAlertPanel(_(@"Problem making connection"), msg,
|
||||||
|
_(@"OK"),nil,nil,nil);
|
||||||
|
NS_ENDHANDLER
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ([currentConnector isKindOfClass: [NSNibControlConnector class]])
|
if ([currentConnector isKindOfClass: [NSNibControlConnector class]])
|
||||||
|
@ -1123,6 +1135,8 @@ selectCellWithString: (NSString*)title
|
||||||
NSString *msg = [NSString stringWithFormat: @"Cannot establish connection: %@",
|
NSString *msg = [NSString stringWithFormat: @"Cannot establish connection: %@",
|
||||||
[localException reason]];
|
[localException reason]];
|
||||||
// get rid of the bad connector and recover.
|
// get rid of the bad connector and recover.
|
||||||
|
[[currentConnector source] setTarget: nil]; // unset these values on the source.
|
||||||
|
[[currentConnector source] setAction: nil]; // ibid.
|
||||||
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
|
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
|
||||||
NSRunAlertPanel(_(@"Problem making connection"), msg,
|
NSRunAlertPanel(_(@"Problem making connection"), msg,
|
||||||
_(@"OK"),nil,nil,nil);
|
_(@"OK"),nil,nil,nil);
|
||||||
|
|
Loading…
Reference in a new issue