Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.
Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.
- Subject: Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.
- From: Joshua Garnham <email@hidden>
- Date: Mon, 7 Sep 2009 16:48:30 +0000 (GMT)
Steven,
The Outline View isn't being displayed with an NSArrayController rather an NSTreeController, but I think you can still override -remove:.
Also, how would I check to see whether the row the user wants to delete has any children?
Cheer,
Josh.
________________________________
From: Steven Degutis <email@hidden>
To: Joshua Garnham <email@hidden>
Cc: email@hidden
Sent: Monday, 7 September, 2009 17:20:50
Subject: Re: Making an NSAlert be displayed when the User attempts to delete a row from an NSOutlineView when it has children.
Josh,
The outline view is probably being displayed with an NSArrayController, not just "Core Data", which is an abstract term for a ton of APIs. As well, NSArrayController falls into part of Cocoa, as well as Core Data, but that's another story.
Assuming your row is "removed" via an outlet to your NSArrayController's -remove: method, and assuming you're using NSArrayController for this in the first place, simply subclass your NSArrayController and provide the NSAlert behavior by overriding -remove: and then call super's -remove: once the NSAlert has come back positive (for chlamydia).
--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/
On Mon, Sep 7, 2009 at 10:14 AM, Joshua Garnham <email@hidden> wrote:
>How would I do this?
>>The Outline View is being used with Core Data.
>
>>Cheers,
>>Josh.
>
>
>
>
>>_______________________________________________
>
>>Cocoa-dev mailing list (email@hidden)
>
>>Please do not post admin requests or moderator comments to the list.
>>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>>Help/Unsubscribe/Update your Subscription:
>
>>This email sent to email@hidden
>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden