Previously, a decoded CPNumberFormatter was converting the minimum and maximum values to 0 if they were set to nil. This was causing unexpected behavior when creating a CPNumberFormatter from a xib. This patch actually decodes _minimum and _maximum values as objects to preserve nil.
Test added in Foundation/CPNumberFormatter.j
Without this fix, `- CPNumberFormatter getObjectValue:forString:errorDescription:` would return `YES` for string @"", like if it was properly converted to an object value, but then actually leave object value unchanged.
With this fix object value is set to nil like in Cocoa.
Refs #1829.
Previously, minimum and maximum were not supported in CPNumberFormatter.
This commit adds support for these in IB and via code. Updated unit tests included.
Fixes#1829
- CPView and subclasses support multiple-value hidden bindings.
- CPControl and subclasses support multiple-value enabled bindings.
- CPWindow and CPBox support multiple-value title with pattern bindings.
- CPButton supports multiple argument + target bindings.
- CPImageView and CPTextField support multiple-value editable bindings.
- CPMenuItem supports multiple-value enabled bindings.
- Fixed bugs in CPObjectController with simple collection operators.
- CPColorWell uses black as the placeholder color.
- Runtime object attributes from a cib are applied as they are read, not deferred.
- NSNumberFormatter now reads the number style from the xib.
- Normalized some parameter names.
- Formatting.
- Test app for all binding types.
Without this fix, CPNumberFormatter didn't format negative values well. E.g. with thousands separators on it could generate, "-,999.00".
This fix generally improves handling of negative numbers by CPNumberFormatter.