Debugging a toolbar issue on 10.5
Debugging a toolbar issue on 10.5
- Subject: Debugging a toolbar issue on 10.5
- From: Graham Cox <email@hidden>
- Date: Mon, 28 Jun 2010 22:22:21 +1000
Got another glitch running my app on 10.5. When I go to customize one of the toolbars, it throws an exception because -encodeWithCoder: wasn't implemented by NSCFType. The exception breaks the whole app because it gets stuck in the customize toolbar mode though no sheet actually appears. On 10.6 the toolbar functions correctly.
I know that one big change with the customize sheet in 10.6 was that it now just shows images of its controls rather than the controls themselves, so I think what's happening is that on 10.5 a control is being copied using archiving/dearchiving but it's holding onto something that isn't archivable. My suspicion is that the culprit is a menu (this toolbar has very few items, and one is a NSPopUpButton which has a menu that is populated by a series of NSMenuDelegates. That seemed straightforward and I added stubs for -encodeWithCoder: for all of these delegates, but that didn't fix it. I've also checked that all my NSMenuItem representedObjects are archivable (they're just NSStrings). So now I'm out of ideas.
The problem is that I don't have a 10.5 development machine, so the only "debugging" I have to go on is what's written to the console, which is not very informative, just [NSCFType encodeWithCoder:] object does not respond to selector.
Some insight into what customize toolbar is trying to archive on 10.5 would help here, so I know where to look next.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden