Re: IB 3.0 plugin & error "NSMapRemove(): attempt to remove
Re: IB 3.0 plugin & error "NSMapRemove(): attempt to remove
- Subject: Re: IB 3.0 plugin & error "NSMapRemove(): attempt to remove
- From: RICKY SHARP <email@hidden>
- Date: Tue, 20 Nov 2007 05:08:02 -0800
On Tuesday, November 20, 2007, at 05:34AM, "Jens Miltner" <email@hidden> wrote:
>Hi,
>
>I have created an IB 3.0 plugin that handles 3 of our custom classes.
>For one of them, whenever I try to save a NIB in 2.x format, saving
>fails with the following error written to the console:
>
> 2007-11-20 12:17:55.955 Interface Builder[65811:10b] ***
>NSMapRemove(): attempt to remove notAKeyMarker
>
>For the other two custom classes, saving works just fine. All of the
>custom classes have an inspector palette, and I can't see anything I'd
>be doing wrong.
>In fact, for the class that fails to save to 2.x format, I can save it
>to both 3.x NIB and XIB format, but just not to 2.x NIB format (which
>is unfortunate, since we need to share this with Tiger developers :( )
>Also, when saving fails, my -[MyClass encodeWithCoder:] method is not
>even called, the error appears to happen earlier.
>The backtrace at the time the exception is raised is also not very
>helpful to me - I have no idea which operation would trigger the
>exception:
>
> #0 0x917ecd86 in -[NSException raise] ()
> #1 0x9441a5ab in -[NSCarbonMenuImpl
>performActionWithHighlightingForItemAtIndex:] ()
> #2 0x9441a1f2 in -[NSMenu performKeyEquivalent:] ()
> #3 0x94418a99 in -[NSApplication _handleKeyEquivalent:] ()
> #4 0x94335e4e in -[NSApplication sendEvent:] ()
> #5 0x00004667 in ?? ()
> #6 0x94293705 in -[NSApplication run] ()
> #7 0x942609ba in NSApplicationMain ()
> #8 0x00006cae in ?? ()
>
>My code just doesn't seem to be involved with the save operation
>itself, however, saving _only_ fails if an instance of this specific
>custom view class is contained in the NIB...
>I already tried removing all bindings from my inspector palette, in
>case this causes the problem, but to no avail...
>
>Since I have no further ideas what to look for - did anybody else
>experience a similar problem and if so, what was the solution?
>Any hints desperately welcome...
Just guesses here; I've not seen this error before...
When you have a nib with the problematic class, what does the compatibility area say about 10.4?
Do you have the proper things in your .classdescription and <yourview>Integration.m files?
When I've had serious issues with IB palettes/plugins, I've sometimes rebuilt the object from the ground-up. For example, comment out everything except for what is actually required. This is often all ivars and acessors. In all NSCoding APIs, I just call through to super. And, any drawRect: or drawInteriorWithFrame: I just fill with a solid color. Custom bindings code is also commented out. Then, you can slowly re-introduce things to see what may be causing this.
Do you provide a custom implementation of copyWithZone:? Note that I don't think that API is called anymore by the IB plugin. I believe though that NSCopying APIs were called in the context of IB palettes.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden