• 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: Newbie question about NSOutlineView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie question about NSOutlineView


  • Subject: Re: Newbie question about NSOutlineView
  • From: Edwin Zacharias <email@hidden>
  • Date: Fri, 14 Feb 2003 23:08:25 -0800 (PST)

NSTableView and NSOutlineView don't keep an internal
cache, so they call their dataSource methods many,
many times. You will want to cache your data for
speed and to keep it from getting prematurely
deallocated.

- Edwin


--- James Gillespie <email@hidden> wrote:
> I am trying to use an NSOutlineView to display some
> data. My
> datasource method outlineView:child:ofItem returns
> an object that is
> auto released.
> For example:
>
> - (id)outlineView:(NSOutlineView *)outlineView
> child:(int)index
> ofItem:(id)item {
> return [[[MyProxyData alloc] initWithStuff:stuff]
> autorelease];
> }
>
> The problem is that the NSOutlineView does not seem
> to retain the
> returned object. When it is passed back to my
> datasource and I access
> it the app crashes. Is the correct behavior for
> NSOutlineView? Is
> there any way to have the NSOutlineView retain this
> item and release it
> when it is done?
>
> Any help is greatly appreciated.
> Thanks,
> James Gillespie
> _______________________________________________
> 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.
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
_______________________________________________
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.

References: 
 >Newbie question about NSOutlineView (From: James Gillespie <email@hidden>)

  • Prev by Date: NSImage release causing NSPrintOperation problem
  • Next by Date: Re: embedding libraries
  • Previous by thread: Newbie question about NSOutlineView
  • Next by thread: NSImage release causing NSPrintOperation problem
  • Index(es):
    • Date
    • Thread