• 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: Outlineview conundrum
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Outlineview conundrum


  • Subject: Re: Outlineview conundrum
  • From: Scott Anguish <email@hidden>
  • Date: Tue, 15 Oct 2002 01:27:35 -0400

On Tuesday, October 15, 2002, at 01:19 AM, Brent Gulanowski wrote:


On Sunday, October 13, 2002, at 06:54 PM, Scott Anguish wrote:

BUT, there is the problem. The Outline allows dragging of both items, and categories to reorder.

Out of your entire description of the problem, I think this might be the most important point, however it is not strictly grammatical, and the meaning is ambiguous. I'm afraid to guess what it means. It seems to say "The outline allows items to be dragged (by the user), and it allows categories to be reordered (by the user)." Or, in active voice, "The outline view allows the user to drag items AND to reorder categories." But I'm not sure.


In the active voice (geez you'd think I'd have gotten that by now :-)

There are two different types of data in the tree... categories and items under the category. Both can be dragged, within the same branch, or to other branches.


Is this "asynch data fetch" to which you refer something that takes an inordinate amount of time, ie: so long that the user could be expected to drag other stuff around before the fetch completes? I think that is what you say later in the post.

It can. Ideally it should take less than a second, but it's not reliable to that number, so I want to be ready..


Maybe what you want to do is give some functionality to this placeholder/proxy object which you are saying you would normally place in the model while the real object gets fetched and built. Let the placeholder remember where it is in the list, and query it for this information when the time comes to replace it.

Ah.. yes.. this is what I would normally do (as I think I said).. the logical method of remembering that placeholder is by it's id.

But, when you drag items around in an outline view, you actually encode them to the pasteboard, and then decode them. And in doing so, the id will change.

My 'way round about' method of dealing with this would be to put a unique identifier string (uuid) with each item, and then that would be saved when it was encoded/decoded, and then I'd just need to find it in the data (best option would be to keep an additional dictionary with the UUID strings as the key, and the instances that they point to as the object, but that would need to be updated when a drag is done as well (all the dearchived items would need to update their objects kept in the dictionary by their UUID..




If you are creating an object with the fetched data, can't you create the object right away and then initialize it with the data when that becomes available? (I'm assuming you are putting off instantiating the relevant object until the data is ready to be encapsulated, but then again, I'm assuming these items in your model are objects at all.)

--
Brent Gulanowski email@hidden

http://inkubator.idevgames.com/
Working together to make great software.
_______________________________________________
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:
    • Solved! Re: Outlineview conundrum
      • From: Scott Anguish <email@hidden>
    • Re: Outlineview conundrum
      • From: Scott Anguish <email@hidden>
References: 
 >Re: Outlineview conundrum (From: Brent Gulanowski <email@hidden>)

  • Prev by Date: Re: How to hide toolbar control in menu bar
  • Next by Date: Re: Carbon vs Cocoa arguments
  • Previous by thread: Re: Outlineview conundrum
  • Next by thread: Re: Outlineview conundrum
  • Index(es):
    • Date
    • Thread