The property canDelete is dependent on three other properties as shown
below.
Is there a problem with my implementation of +
keyPathsForValuesAffectingCanDelete with regard to the key path
@"arrayController.canRemove"?
Modifying property1 and property2 results in the re-evaluation of -
canDelete.
Removing all items in the array bound to arrayController does not
cause -canDelete to be evaluated, even though [arrayController
canRemove] becomes NO.
- (BOOL)canDelete
{
BOOL canRemove = [arrayController canRemove];
if (self.property1 && self.property2) {
canRemove = NO;
}
return canRemove;
}
+ (NSSet *)keyPathsForValuesAffectingCanDelete
{
return [NSSet setWithObjects:@"property1", @"property2",
@"arrayController.canRemove", nil];
}
Jonathan Mitchell
Central Conscious Unit
http://www.mugginsoft.com
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com