On 24 Jan 2007, at 16:36, Ted Howard wrote:
When I try to compile gui from the trunk, I get a duplicate member
error in NSMenuItemCell.h on _backgroundColor.
Upon looking at the code, I noticed that NSButtonCell was recently
modified to include a _backgroundColor member. Since
NSMenuItemCell extends NSButtonCell, the _backgroundColor member of
NSMenuItemCell should be removed.
I tried this on my machine, and it seems to work fine. I have
attached a patch that does this.
Ted
<NSMenuItemCell-duplicate_backgroundColor.patch>
Thanks for the report ... I don't think your patch is safe though,
because a quick look at the code shows that NSMenuItemCell uses the
ivar to hold a (non-retained) object, while NSButtonCell retains it,
so the two pieces of code would certainly interact badly if they are
sharing the same ivar.
I'm not really familiar with either section of code though, so I'm
not sure how this should be resolved (though my guess is that
removing the ivar from NSMenuItemCell and rewriting the relevant code
in that class is the way to go) and I hope someone else can fix this.
Perhaps a bigger issue is that my compiler (gcc-4.1.1) happily
compiles the current code! Now that seems to me like a rather severe
compiler bug. Does anyone know different?
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
http://lists.gnu.org/mailman/listinfo/gnustep-dev