Finding the parent of an outline view item
Finding the parent of an outline view item
- Subject: Finding the parent of an outline view item
- From: Joseph Jones <email@hidden>
- Date: Fri, 10 Jan 2003 20:59:55 -0800
Hi,
I was wondering if there was a way to find the parent of an outline
view item using outline view itself? Normally, I would just use the
datasource for the view, but I have an issue where my child elements
are children of more than one parent. This leads to an issue where,
when the view is requesting data from a child and that data is
dependent on which parent this particular item is for, I have no idea
how to calculate it.
I have a little hack where I walk from the current item's row back
till I find the parent item (using isKindOfClass, though levelForRow is
just as good here). This hack works, but I hate having to do it every
time I get requests for the data. It seems to me that parent-child
relationships are something that outline view would need to track, but
I could be wrong on that account.
Any help would be appreciated.
TIA,
Joe
_______________________________________________
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.