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

Newbie question about NSOutlineView


  • Subject: Newbie question about NSOutlineView
  • From: James Gillespie <email@hidden>
  • Date: Fri, 14 Feb 2003 22:36:25 -0800

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.

  • Follow-Ups:
    • Re: Newbie question about NSOutlineView
      • From: Edwin Zacharias <email@hidden>
  • Prev by Date: Weird linking problems
  • Next by Date: Re: embedding libraries
  • Previous by thread: Re: Weird linking problems
  • Next by thread: Re: Newbie question about NSOutlineView
  • Index(es):
    • Date
    • Thread