Re: Problems with NSOutlineView in Java?
Re: Problems with NSOutlineView in Java?
- Subject: Re: Problems with NSOutlineView in Java?
- From: "Doug Knowles \(PB\)" <email@hidden>
- Date: Wed, 27 Jun 2001 16:09:02 -0400
Thanks for the clarification, Tom.
I'm thinking now that maybe it isn't my data source that's getting lost;
maybe it's the items passed to NSOutlineView.
If I click on an entry in my outline view, my source's
selectionShouldChangeInOutlineView() method is called. If I return false,
there is no response to the click (of course) and no crash. If
selectionShouldChangeInOutlineView() returns true, then one of two (bad)
things happen: a crash (SIGxxx), OR my outlineViewShouldSelectItem() method
is called WITH A WIERD "item" parameter, not recognizable as any item I
provided to the outline view. (The "item" object usually displays through
printf with the name of an icon in my ToolBar, strangely enough.) I never
see an item I recognize as data from my outline. I'm assuming that I have
the Objective-C equivalent to a "wild pointer" problem, and my results
(crash or wierd arguments) vary depending on where the wild pointer is
pointing. The fact that I do sometimes receive a (nonsensical) call to my
data source seems to suggest that the objc side has not lost track of my
data source.
So now I'm wondering if I missed something fundamental about what I am
allowed to return in response to outlineViewObjectValueForItem(). I have
been returning Java String objects from this method (and keeping references
to them to keep them from being collected). Is there some magic about
returning these values as Java objects that I am missing?
Thanks again for the help.
Doug K;
----- Original Message -----