• 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: Mon, 17 Feb 2003 11:24:04 -0600

Alex,

You may have it solved already. If not, two things to keep in mind which you probably already know.

1.) The dragged entity is a COPY of the original
2.) If you ADD the COPY **first**, then the original will be at a new index if the drag was to a LOWER index

In other words, if you drag item 5 to be at a new index of 3, and you add the copy of item 5 at index 3, then the original item 5 is really item 6

and so forth for the other way around as well.

Also, it may not matter to you but if any other part of your code refers to the original object, then you will have two objects that you are treating as the same when in fact they will be different instances.

To avoid ALL confusion in the future (with your app), 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.

I do this because many of my objects refer to one another. REF the Circular referencing post we've chatted about!!

d
_______________________________________________
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>
    • Re: mysterious NSOutlineView crashing
      • From: Alex Rice <email@hidden>
  • Prev by Date: Re: Interface Builder
  • Next by Date: Re: Interface Builder
  • Previous by thread: Re: mysterious NSOutlineView crashing
  • Next by thread: Re: mysterious NSOutlineView crashing
  • Index(es):
    • Date
    • Thread