Re: NSTableView Drag & Drop... Well, Maybe
Re: NSTableView Drag & Drop... Well, Maybe
- Subject: Re: NSTableView Drag & Drop... Well, Maybe
- From: Bill Cheeseman <email@hidden>
- Date: Wed, 09 Oct 2002 06:07:40 -0400
on 02-10-08 4:21 PM, mw at email@hidden wrote:
>
Whenever any element of the array that was brought
>
from the pasteboard is accessed, an EXEC_BAD_ACCESS error is returned.
>
Remember, this array was just brought down from a "freeze-dried" state as an
>
NSData object back into an NSMutableArray. This takes place in the second
>
loop, as previously stated.
Are you retaining them when you unarchive them? You're supposed to, I
believe. I ask, because it feels like your problem comes from a failure to
retain something pretty early in your problem scenario.
>
2002-10-08 16:10:53.117 RaiseMan[1712] *** -[NSConcreteMutableData
>
objectAtIndex:]: selector not recognized
>
>
My guess is that this error is being returned because it is attempting to
>
send a message to a dangling pointer. The employees array stores a group of
>
custom data type objects (subclass of NSObject, of course). Do I have to
>
impliment the NSCopying protocol so I can, perhaps, send a [MyObject copy]
>
message when inserting it (or them) into the array that is to be archived as
>
an NSData object for pasteboard placement?
I get the selector not recognized error under these circumstances (dangling
pointer), so your first supposition seems right. That's why I say it feels
like a failure to retain something early on. If it were a failure to adopt
the NSCopying protocol when required to do so, you would probably see a
"copyWithZone: selector not recognized" error.
--
Bill Cheeseman - email@hidden
Quechee Software, Quechee, Vermont, USA
http://www.quecheesoftware.com
The AppleScript Sourcebook -
http://www.AppleScriptSourcebook.com
Vermont Recipes -
http://www.stepwise.com/Articles/VermontRecipes
Croquet Club of Vermont -
http://members.valley.net/croquetvermont
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.