Question

According to Apple's documentation,


setAlwaysUsesMultipleValuesMarker:

Sets whether the receiver always returns the multiple values marker when multiple objects are selected, even if they have the same value.

- (void)setAlwaysUsesMultipleValuesMarker:(BOOL)flag

Discussion:

Setting flag to YES can increase performance if your application doesn’t allow editing multiple values. The default is NO.


However, I have trouble understanding what this all means even after reading the documentation. Can anybody offer a simpler explanation with examples?

Was it helpful?

Solution

Found the answer to this question deep inside apple docs on Cocoa Binding Guide.


  • NSMultipleValuesMarker

The NSMultipleValuesMarker indicates that more than one object is selected in the controller and the values for the requested key aren’t the same.

By default controllers return the NSMultipleValuesMarker only when the values for the requested key differ. For example, if the value for selection.name returns an array containing three strings—”Tony”, “Tony”, “Tony”—the string “Tony” is returned instead of the NSMultipleValuesMarker.

A collection controller can be configured—either programmatically using the method setAlwaysUsesMultipleValuesMarker: or by checking the Always uses multiple values marker checkbox in Interface Builder—such that it always returns NSMultipleValuesMarker when multiple items are selected, even if the values are equal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top