mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 14:10:47 +00:00
Minor fix for loading nibs
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@5795 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fff420f2ef
commit
e52de6929e
2 changed files with 37 additions and 25 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Jan 17 6:32:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSBundleAdditions.m: Catch exceptions when loading nib so
|
||||
we simply return YES or NO. Fix suggested by karl@nfox.com
|
||||
|
||||
Sun Jan 16 8:57:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
|
||||
|
||||
* Source/NSWindow.m: Don't log DnD stuff unless NSDragging logging
|
||||
|
|
|
@ -201,14 +201,15 @@
|
|||
externalNameTable: (NSDictionary *)context
|
||||
withZone: (NSZone *)zone
|
||||
{
|
||||
NSData *data;
|
||||
BOOL loaded = NO;
|
||||
NSUnarchiver *unarchiver = nil;
|
||||
|
||||
NS_DURING
|
||||
{
|
||||
NSData *data = [NSData dataWithContentsOfFile: fileName];
|
||||
|
||||
data = [NSData dataWithContentsOfFile: fileName];
|
||||
if (data != nil)
|
||||
{
|
||||
NSUnarchiver *unarchiver;
|
||||
|
||||
unarchiver = [[NSUnarchiver alloc] initForReadingWithData: data];
|
||||
if (unarchiver != nil)
|
||||
{
|
||||
|
@ -223,7 +224,7 @@
|
|||
[obj awakeWithContext: context];
|
||||
/*
|
||||
*Ok - it's all done now - just retain the nib container
|
||||
* so tthat it will not be released when the unarchiver
|
||||
*so that it will not be released when the unarchiver
|
||||
*is released, and the nib contents will persist.
|
||||
*/
|
||||
RETAIN(obj);
|
||||
|
@ -237,6 +238,12 @@
|
|||
RELEASE(unarchiver);
|
||||
}
|
||||
}
|
||||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
TEST_RELEASE(unarchiver);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
return loaded;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue