2

I got a NSOutlineView and there are a couple items on it. Each one has 3 children(places, photos and social). They all have the same children. Say the user has selected places, does anyone knows how may I detect which item is the parent of the selected item?

Thanks!

Fernando Valente
  • 1,096
  • 1
  • 8
  • 30

1 Answers1

1

-[NSOutlineView selectedRow] (inherited from NSTableView)
-[NSOutlineView itemAtRow:]
-[NSOutlineView parentForItem:]

Ken Thomases
  • 88,520
  • 7
  • 116
  • 154
  • Too bad it doesn't work when every item has the same children :( – Fernando Valente Apr 09 '12 at 12:52
  • They might have children with the same names, but they shouldn't be the same items. The "Places" item under one parent shouldn't be the same item as the "Places" item under a different parent. – Ken Thomases Apr 09 '12 at 15:28
  • I do not know if Ken Thomases answers the question but there are some things that have been useful to me in his answer. – Chrstpsln May 18 '17 at 06:49