• 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
NSOutlineView and DO
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSOutlineView and DO


  • Subject: NSOutlineView and DO
  • From: Brian Webster <email@hidden>
  • Date: Wed, 29 May 2002 14:50:06 -0500

I'm working on a project where I'd like to display a bunch of information in an outline view according to data that lives in another process. I'm using distributed objects for communication, but displaying the info for these objects in the NSOutlineView is posing a bit of a problem. Here's what happens:

The outline view asks for the children of the item nil. The data source method retrieves the objects from the other process and returns them to the outline view. Of course, because it's getting this over DO, it's actually returning a proxy to the object to the outline view.

After the outline view gets these items, it does not immediately ask for the object values to display in the table. It waits until it needs to draw itself and then asks for the object value for each column. Of course, this doesn't happen until the next time around the run loop. This means that the autorelease pool that was active when the proxies were created is released, thus releasing the proxies, since the outline view doesn't retain its data, nor does my local data source. So, when it asks for the object value for a given row/column, it sends in a proxy that's been released and the app crashes. Note that the real object that lives in the other app is still fine and has not been released - only the proxy is dead.

This seems like a pretty simple thing to want to do, and I wanted to see if anyone has run into this problem or a similar one before and found a good way around it. At this point, all I can think of is to build a local "mirror" of the data, or at least the structure of the data as it's presented in the outline view, but this seems like quite a pain to have to do.

--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
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.

  • Prev by Date: Re: Title bar at the left side with NSPanel? (Utility window)
  • Next by Date: Re: NSView -subviews ordering?
  • Previous by thread: Re: Title bar at the left side with NSPanel? (Utility window)
  • Next by thread: Hiding/Showing Table Columns
  • Index(es):
    • Date
    • Thread