* Source/GSNibCompatibility.m: Correct issue when loading into

Gorm.  NSClassSwapper should check to see if it's in the gui builder
	and return the appropriate class.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27169 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2008-11-28 20:16:26 +00:00
parent 17da1df764
commit 1e3d6a195f
2 changed files with 20 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2008-11-28 15:20-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m: Correct issue when loading into
Gorm. NSClassSwapper should check to see if it's in the gui builder
and return the appropriate class.
2008-11-27 10:07-EST Gregory John Casamento <greg_casamento@yahoo.com>
* Source/GSNibCompatibility.m: Corrected issue with using generic

View file

@ -968,8 +968,14 @@ static BOOL _isInInterfaceBuilder = NO;
id object = nil;
NSKeyedUnarchiver *decoder = (NSKeyedUnarchiver *)coder;
// if there is a replacement class, use it, otherwise, use the one specified.
newClass = [decoder replacementClassForClassName: className];
if([NSClassSwapper isInInterfaceBuilder] == YES)
{
newClass = [decoder replacementClassForClassName: _originalClassName];
}
else
{
newClass = [decoder replacementClassForClassName: className];
}
// swap the class...
object = [newClass allocWithZone: NSDefaultMallocZone()];
@ -987,13 +993,17 @@ static BOOL _isInInterfaceBuilder = NO;
- (id) unarchiver: (NSKeyedUnarchiver *)coder
didDecodeObject: (id)obj
{
Class newClass = [coder replacementClassForClassName: _className];
Class newClass = nil;
id result = obj;
// if we are in an interface builder, then return the original object.
if ([NSClassSwapper isInInterfaceBuilder] == YES)
{
return obj;
newClass = [coder replacementClassForClassName: _originalClassName];
}
else
{
newClass = [coder replacementClassForClassName: _className];
}
// if this is a class which uses cells, override with the new cellClass, if the