How would I do this? The Outline View is being used with Core Data.
views:
71answers:
1
+2
A:
This hasn't really got anything to do with Core Data. Just check [object.children count] upon deletion. When it is not 0, show a NSAlert.
Jongsma
2009-09-06 13:21:40
I had a go at it bearing in mind what you said. Here's what happened - http://snapplr.com/hx7s.
Joshua
2009-09-06 15:29:48
That's because `selectedRow` is just a number, not the underlying row object, so it doesn't respond to the `children` message.
Abizern
2009-09-06 15:36:14
Oh, I see. How would I get the underlying row object?
Joshua
2009-09-06 16:27:33
I had a go at getting the underlying row object using this code. http://snapplr.com/xae4. Am I on the right track?
Joshua
2009-09-06 17:16:23
Joshua: You need `selectedRow` to be the model object for what the user has selected. You know, the object with the `children` property.
Peter Hosey
2009-09-06 18:11:58
Whats the the model object for what the user has selected?
Joshua
2009-09-06 18:54:46