mirror of
https://github.com/gnustep/apps-gorm.git
synced 2025-04-22 22:20:44 +00:00
Brings up alert if header can't be parsed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/gorm/trunk@21151 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
314f0e9d38
commit
c7f0afb590
2 changed files with 25 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-04-23 22:57 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormClassEditor.m: Change in performDragOperation: to
|
||||
bring up an alert panel if the header can't be parsed.
|
||||
|
||||
2005-04-23 20:13 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||
|
||||
* GormCore/GormClassEditor.m: Register for all types.
|
||||
|
|
|
@ -592,7 +592,26 @@ NSString *GormClassPboardType = @"GormClassPboardType";
|
|||
en = [data objectEnumerator];
|
||||
while((fileName = [en nextObject]) != nil)
|
||||
{
|
||||
[classManager parseHeader: fileName];
|
||||
NS_DURING
|
||||
{
|
||||
if(![classManager parseHeader: fileName])
|
||||
{
|
||||
NSString *file = [fileName lastPathComponent];
|
||||
NSString *message = [NSString stringWithFormat:
|
||||
_(@"Unable to parse class in %@"),file];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
NSString *message = [localException reason];
|
||||
NSRunAlertPanel(_(@"Problem parsing class"),
|
||||
message,
|
||||
nil, nil, nil);
|
||||
}
|
||||
NS_ENDHANDLER;
|
||||
}
|
||||
return YES;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue