mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
NSKeyValueMutableSet: Fix will and didChange notifications for set operations
This commit is contained in:
parent
d2a50254d0
commit
9f3fa5baa5
1 changed files with 9 additions and 8 deletions
|
@ -682,6 +682,7 @@
|
|||
{
|
||||
if (notifiesObservers && !changeInProgress)
|
||||
{
|
||||
NSLog(@"Observer Object: %@ addingObject: %@", object, anObject);
|
||||
[object willChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueUnionSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
|
@ -718,14 +719,14 @@
|
|||
{
|
||||
[object willChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueUnionSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
[set unionSet: anObject];
|
||||
if (notifiesObservers && !changeInProgress)
|
||||
{
|
||||
[object didChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueUnionSetMutation
|
||||
usingObjects: [NSSet setWithObject:anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,14 +736,14 @@
|
|||
{
|
||||
[object willChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueMinusSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
[set minusSet: anObject];
|
||||
if (notifiesObservers && !changeInProgress)
|
||||
{
|
||||
[object didChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueMinusSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -752,14 +753,14 @@
|
|||
{
|
||||
[object willChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueIntersectSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
[set intersectSet: anObject];
|
||||
if (notifiesObservers && !changeInProgress)
|
||||
{
|
||||
[object didChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueIntersectSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -769,14 +770,14 @@
|
|||
{
|
||||
[object willChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueSetSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
[set setSet: anObject];
|
||||
if (notifiesObservers && !changeInProgress)
|
||||
{
|
||||
[object didChangeValueForKey: key
|
||||
withSetMutation: NSKeyValueSetSetMutation
|
||||
usingObjects: [NSSet setWithObject: anObject]];
|
||||
usingObjects: anObject];
|
||||
}
|
||||
}
|
||||
@end
|
||||
|
|
Loading…
Reference in a new issue