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:
Nicola Pero 2000-12-16 13:56:25 +00:00
parent ac3979e8f4
commit 24b3d9ce47

View file

@ -208,6 +208,7 @@ static NSColor *shadowCol;
else
{
ASSIGN (_contents, @"Minimum");
_cell.contents_is_attributed_string = NO;
textSize = [super cellSize];
RELEASE (_contents);
_contents = nil;
@ -289,6 +290,23 @@ static NSColor *shadowCol;
[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
{
BOOL tmp;