• 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: NSOutlineView blowing stack
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSOutlineView blowing stack


  • Subject: Re: NSOutlineView blowing stack
  • From: Allan Odgaard <email@hidden>
  • Date: Fri, 20 Feb 2004 00:48:09 +0100

On 19. Feb 2004, at 23:53, Tom Harrington wrote:

I'm using an NSOutlineView that, when I call -reloadData, will sometimes get into a recursive loop of function calls until it runs out of stack space. [...]

Does the data contain cycles? i.e. a dictionary having a key for a child array, where each child has a parent key pointing back to the original dictionary?

At least this will do it -- I am not entirely sure what goes wrong: comparing dictionaries and arrays (with isEqual:) should be safe, even when cyclic data appear (because it doesn't do a deep compare unless the pointers differ), but the NSOutlineView will often do infinite recursions when handed such data.

Btw: another problem with cyclic data is that you are causing a retain loop, and thus the data will never be released (because children retain parents, so neither will ever get a retain count of zero). Though it shouldn't crash ;)
_______________________________________________
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: NSOutlineView blowing stack
      • From: Tom Harrington <email@hidden>
References: 
 >NSOutlineView blowing stack (From: Tom Harrington <email@hidden>)

  • Prev by Date: Re: Disclosure Triangle Icon
  • Next by Date: Re: Disclosure Triangle Icon
  • Previous by thread: Re: NSOutlineView blowing stack
  • Next by thread: Re: NSOutlineView blowing stack
  • Index(es):
    • Date
    • Thread