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: Volker in Lists <email@hidden>
- Date: Mon, 7 Sep 2009 19:27:58 +0200
Hi,
NSArray *selectedRow = [treeController selectedObjects];
you get an NSArray -> so you should enumerate through the objects of
the array
NSInteger childrenCount = [selectedRow.children count];
Does not get the children count of anything but the NSArray, which it
doesn't have. You should get a warning when compiling. Something along
struct or union doesn't blah, blah blah.
Told you before: Read the warnings and try to understand them.
Cheers,
Volker
_______________________________________________
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