mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-20 22:06:42 +00:00
Added keyed decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@18530 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2c97e5fa28
commit
afabdddd55
7 changed files with 171 additions and 61 deletions
|
@ -276,10 +276,23 @@ static Class imageCellClass;
|
|||
- (id) initWithCoder: (NSCoder *)aDecoder
|
||||
{
|
||||
self = [super initWithCoder: aDecoder];
|
||||
if ([aDecoder versionForClassName: @"NSImageView"] >= 2)
|
||||
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
_target = [aDecoder decodeObject];
|
||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||
//NSArray *dragType = [aDecoder decodeObjectForKey: @"NSDragTypes"];
|
||||
|
||||
if ([aDecoder containsValueForKey: @"NSEditable"])
|
||||
{
|
||||
[self setEditable: [aDecoder decodeBoolForKey: @"NSEditable"]];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([aDecoder versionForClassName: @"NSImageView"] >= 2)
|
||||
{
|
||||
_target = [aDecoder decodeObject];
|
||||
[aDecoder decodeValueOfObjCType: @encode(SEL) at: &_action];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue