mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
(-loadBindingsFromFile:): Handle errors directly instead of using (broken) exception handling code.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18059 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fed935717b
commit
ca2773de30
2 changed files with 12 additions and 13 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-11-07 14:42 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSInputManager.m (-loadBindingsFromFile:): Handle errors
|
||||
directly instead of using (broken) exception code.
|
||||
|
||||
2003-11-01 18:19 Alexander Malmberg <alexander@malmberg.org>
|
||||
|
||||
* Source/NSLayoutManager.m (-drawGlyphsForGlyphRange:atPoint:):
|
||||
|
|
|
@ -292,23 +292,17 @@ static NSInputManager *currentInputManager = nil;
|
|||
|
||||
- (void) loadBindingsFromFile: (NSString *)fullPath
|
||||
{
|
||||
NS_DURING
|
||||
{
|
||||
NSDictionary *bindings;
|
||||
NSDictionary *bindings;
|
||||
|
||||
bindings = [NSDictionary dictionaryWithContentsOfFile: fullPath];
|
||||
if (bindings == nil)
|
||||
{
|
||||
[NSException raise];
|
||||
}
|
||||
|
||||
[_rootBindingTable loadBindingsFromDictionary: bindings];
|
||||
}
|
||||
NS_HANDLER
|
||||
bindings = [NSDictionary dictionaryWithContentsOfFile: fullPath];
|
||||
if (bindings == nil)
|
||||
{
|
||||
NSLog (@"Unable to load KeyBindings from file %@", fullPath);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
else
|
||||
{
|
||||
[_rootBindingTable loadBindingsFromDictionary: bindings];
|
||||
}
|
||||
}
|
||||
|
||||
- (void) loadBindingsWithName: (NSString *)fileName
|
||||
|
|
Loading…
Reference in a new issue