mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 10:50:47 +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
7ebc080da5
commit
108986ee7d
7 changed files with 171 additions and 61 deletions
|
@ -198,14 +198,23 @@ static NSColor *txtCol;
|
|||
|
||||
- (id) initWithCoder: (NSCoder*)aDecoder
|
||||
{
|
||||
BOOL tmp;
|
||||
[super initWithCoder: aDecoder];
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_background_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_text_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
_textfieldcell_draws_background = tmp;
|
||||
_textfieldcell_is_opaque = [self _isOpaque];
|
||||
if ([aDecoder allowsKeyedCoding])
|
||||
{
|
||||
[self setBackgroundColor: [aDecoder decodeObjectForKey: @"NSBackgroundColor"]];
|
||||
[self setTextColor: [aDecoder decodeObjectForKey: @"NSTextColor"]];
|
||||
}
|
||||
else
|
||||
{
|
||||
BOOL tmp;
|
||||
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_background_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(id) at: &_text_color];
|
||||
[aDecoder decodeValueOfObjCType: @encode(BOOL) at: &tmp];
|
||||
_textfieldcell_draws_background = tmp;
|
||||
_textfieldcell_is_opaque = [self _isOpaque];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue