I am currently on holidays with only my iPad and limited connectivity. That's why I may be wrong on a few things. Still I think that the class swapper does stuff it should not be doing. It seems to replace all cell objects not just the cells belonging to the controler it is currently decoding. And it even replaces these cells when they are already of the correct subclass. Both things, if valid, need to be changed.
What I don't understand is why a menu item would use its cell as the target. Or is the main cell of a popup button being used as the target of its menu items? Only the inspection of the NIB file could explain this. The later could explain our problem as we replace an object that has external references to it.
Fred On the road
Upon further examination, I'm not sure that Fred's concern is valid. The reason the cell contents are not copied is because they don't have to be:
result = [[newCellClass alloc] initWithCoder: coder]; The above line in the method -(id)unarchiver:didDecodeObject: unarchives the proper attributes into the new instance and replaces the old instance of the cell.
|