Implemented copyWithZone

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@8330 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
nico 2000-12-16 13:56:25 +00:00
parent efc8f44085
commit e1ded49b8f

View file

@ -208,6 +208,7 @@ static NSColor *shadowCol;
else else
{ {
ASSIGN (_contents, @"Minimum"); ASSIGN (_contents, @"Minimum");
_cell.contents_is_attributed_string = NO;
textSize = [super cellSize]; textSize = [super cellSize];
RELEASE (_contents); RELEASE (_contents);
_contents = nil; _contents = nil;
@ -289,6 +290,23 @@ static NSColor *shadowCol;
[self drawInteriorWithFrame: cellFrame inView: controlView]; [self drawInteriorWithFrame: cellFrame inView: controlView];
} }
/*
* Copying
*/
- (id) copyWithZone: (NSZone*)zone
{
NSFormCell *c = (NSFormCell *)[super copyWithZone:zone];
/* We need to copy the title cell (as opposed to simply copying the
pointer to it), otherwise if eg we change the string value of the
title cell of the copied cell, the string value of the title cell
of the original cell would be changed too ! */
c->_titleCell = [_titleCell copyWithZone: zone];
return c;
}
- (void) encodeWithCoder: (NSCoder*)aCoder - (void) encodeWithCoder: (NSCoder*)aCoder
{ {
BOOL tmp; BOOL tmp;