• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: mysterious NSOutlineView crashing
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mysterious NSOutlineView crashing


  • Subject: Re: mysterious NSOutlineView crashing
  • From: Generic User <email@hidden>
  • Date: Tue, 18 Feb 2003 14:52:12 -0600

On Monday, February 17, 2003, at 11:56 PM, Alex Rice wrote:

On Monday, February 17, 2003, at 10:24 AM, Generic User wrote:
To avoid ALL confusion in the future (with your app),

No, I'll always be confused about something ;-)

I would use the unarchived (dragged) item...ONLY to allow you to LOCATE the original in the datasource. Then, I'd simply move the original as appropriate and let the dragged copy free itself after the -outlineView:acceptDrop:item:childIndex: method returns.

This way, the visual interface and the datasource are TRULY kept the same.

Thanks for your suggestions. Now I've discovered something weird.

I'm using a local accessor for drags within the same outlineview, so I'm not even using the unarchived items. (I will, however, use the unarchived items for drags from other document's outlineviews in my app) But this is the local (intra outlineview) case. I've verified that the objects I'm inserting in my acceptDrop: method have the same pointers as the objects they are replacing- the ones being moved.
hmmm, never thought to do that. do you write the dragged item pointer to an instance variable in writeItems:, then just manipulate it in acceptDrop: ?
I'm not sure what happens to the pasteboard copy then.
assuming each item in the OV is a NSD and that the NSDs are in an NSArray and the children of each NSD are in an NSArray within the NSD...follow so far..
Then you would have to be putting the object into some array at some index and then removing the old one. Make sure you are removing by index rather than removeObject: because they are the same and it will remove the first one it comes to I think, which may not be the one you want removed.

The crash really does seems to be caused by re-selecting the dragged objects after the operation is complete. The data source is fine as far as I can tell. There seems to be no way to select the moved objects after the operation is complete, without crashing. Obviously it's possible since Omnioutliner, Project Builder, etc. all maintain the selection after dragging-dropping.
do you mean selecting with the mouse?
I suspect it could have something to do with me using NSMutableDictionary for my data source nodes. Somehow that's confusing NSOutlineView. I've pretty well convinced myself that my data source is not getting corrupted. I'm getting stuck in a rut on this one. For now, I'm just not going to reselect the items after the (intra outlineview) drag operation
is it the intra drag that is crashing? i'm getting confused
_______________________________________________
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.

  • Follow-Ups:
    • Re: mysterious NSOutlineView crashing
      • From: Alex Rice <email@hidden>
References: 
 >Re: mysterious NSOutlineView crashing (From: Alex Rice <email@hidden>)

  • Prev by Date: Re: AddressBook searching broken in 10.2.4
  • Next by Date: NSString doubleValue and zero
  • Previous by thread: Re: mysterious NSOutlineView crashing
  • Next by thread: Re: mysterious NSOutlineView crashing
  • Index(es):
    • Date
    • Thread