views:

71

answers:

1

How would I do this? The Outline View is being used with Core Data.

+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
I had a go at it bearing in mind what you said. Here's what happened - http://snapplr.com/hx7s.
Joshua
That's because `selectedRow` is just a number, not the underlying row object, so it doesn't respond to the `children` message.
Abizern
Oh, I see. How would I get the underlying row object?
Joshua
I had a go at getting the underlying row object using this code. http://snapplr.com/xae4. Am I on the right track?
Joshua
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
Whats the the model object for what the user has selected?
Joshua