mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-02-23 19:51:00 +00:00
Updated GormInspectorsManager.m to check for problems when creating connections. If there is a problem the connection is cleared and an error is displayed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@17642 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
3b7d508e7d
commit
130af7186b
2 changed files with 18 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2003-09-07 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormInspectorsManager.m: Similar to the previous check. Modified
|
||||
-[ok:] such that if a connection is established and for any reason
|
||||
causes an exception, the connection is removed and an error message
|
||||
is displayed describing what caused the connection to fail.
|
||||
|
||||
2003-09-07 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormInspectorsManager.m: Added check in -[ok:] to determine if
|
||||
|
|
|
@ -1054,7 +1054,7 @@ selectCellWithString: (NSString*)title
|
|||
if([currentConnector destination] == nil)
|
||||
{
|
||||
NSRunAlertPanel(_(@"Problem making connection"),
|
||||
_(@"You must select a valid destination"),
|
||||
_(@"Please select a valid destination."),
|
||||
_(@"OK"), nil, nil, nil);
|
||||
}
|
||||
else if ([connectors containsObject: currentConnector] == YES)
|
||||
|
@ -1117,7 +1117,16 @@ selectCellWithString: (NSString*)title
|
|||
&& [[currentConnector destination]
|
||||
isKindOfClass: [GormObjectProxy class]] == NO)
|
||||
{
|
||||
[currentConnector establishConnection];
|
||||
NS_DURING
|
||||
[currentConnector establishConnection];
|
||||
NS_HANDLER
|
||||
NSString *msg = [NSString stringWithFormat: @"Cannot establish connection: %@",
|
||||
[localException reason]];
|
||||
// get rid of the bad connector and recover.
|
||||
[[(id<IB>)NSApp activeDocument] removeConnector: currentConnector];
|
||||
NSRunAlertPanel(_(@"Problem making connection"), msg,
|
||||
_(@"OK"),nil,nil,nil);
|
||||
NS_ENDHANDLER
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue