* Headers/AppKit/NSKeyValueBinding.h,

* Source/NSKeyValueBinding.m: Add helper function NSIsControllerMarker.
This commit is contained in:
fredkiefer 2018-02-26 00:13:15 +01:00
parent aceb737281
commit f2ebe775d9
3 changed files with 13 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2018-02-25 Fred Kiefer <FredKiefer@gmx.de>
* Headers/AppKit/NSKeyValueBinding.h,
* Source/NSKeyValueBinding.m: Add helper function NSIsControllerMarker.
2018-02-09 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSDisplayServer.m: Store the current display server in a

View file

@ -91,6 +91,8 @@
// binding values
#if OS_API_VERSION(MAC_OS_X_VERSION_10_4, GS_API_LATEST)
APPKIT_EXPORT BOOL NSIsControllerMarker(id object);
// Keys in dictionary returned by infoForBinding
APPKIT_EXPORT NSString *NSObservedObjectKey;
APPKIT_EXPORT NSString *NSObservedKeyPathKey;

View file

@ -541,6 +541,12 @@ void GSBindingInvokeAction(NSString *targetKey, NSString *argumentKey,
@end
BOOL NSIsControllerMarker(id object)
{
return [NSMultipleValuesMarker isEqual: object]
|| [NSNoSelectionMarker isEqual: object]
|| [NSNotApplicableMarker isEqual: object];
}
//Helper functions
BOOL GSBindingResolveMultipleValueBool(NSString *key, NSDictionary *bindings,