For reference, the canonical solution to this issue is to implement a class method like this:
+ (NSSet *)keyPathsForValuesAffectingMenuItemTitle
{
return [NSSet setWithObjects: @"propertyMenuItemTitleDependsOn1",
@"propertyMenuItemTitleDependsOn2",
nil];
}
If you implement a method like this, then the framework will handle calling willChangeValueForKey:
and didChangeValueForKey:
for the key menuItemTitle
any time any of the other properties are changed.