#228: Crash in my NSOutlineView data source
--------------------------------+-------------------------------------------
Reporter: cyber...@… | Owner: lsansone...@…
Type: defect | Status: closed
Priority: major | Milestone:
Component: MacRuby | Resolution: invalid
Keywords: crash |
--------------------------------+-------------------------------------------
Changes (by lsansone...@…):
* status: new => closed
* resolution: => invalid
* milestone: MacRuby 1.0 =>
Comment:
This isn't a bug in MacRuby but a bug in your code. You must always return
unique objects from the data source methods. In your
outlineView:child:ofItem: implementation you are returning new Pair
objects, this will very likely crash the outline view because it does not
retain the objects.
http://developer.apple.com/documentation/Cocoa/Conceptual/OutlineView/Articles/UsingOutlineDataSource.html#//apple_ref/doc/uid/20000725-140686
I recommend to cache the Pair objects and always return the same
instances.
--
Ticket URL: <http://www.macruby.org/trac/ticket/228#comment:3>
MacRuby <http://macruby.org/>
_______________________________________________
MacRuby-devel mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel