Both controls and cells can have tags in IB, but Cappuccino has no cells. If the control has a tag, that takes precedence. Tag reading was moved to NSControl from NSView, since NSView does not have a tag in Cocoa.
Without this optimisation nil or 0x0 sized image slices in three part and nine part images result in useless empty divs.
Eliminating these divs should improve performance and reduce memory usage.
Although exact memory usage is hard to measure, in a large app the number of divs on screen went from 1012 to 984, a reduction of about 2.7%.
- Moved common CPArray/CPSet collection KVC operators to _CPCollectionKVCOperators.
- Implemented KVC operator dispatch using Objective-J.
- Fixed infinite loop with empty collection in @min, @max and @sum operators.
- Correctly return valueForUndefinedKey when necessary.
- valueForUndefinedKey reason uses raw description for consistency, class' overridden description may not helpful at all.
- Don't create a forwarder for @ operators with property paths.
- Fixed CPSet -valueForKeyPath to correctly deal with nil/undefined/empty values.
- Added tests for collection KVC operators.
- enumerator -nextObject should always compare against nil for clarity, correctness, and consistency.
This makes it possible to theme any themeClass without having to subclass a CPView and return something different from defaultThemeClass. Theme a custom theme class by assigning to a control within the theme descriptor ([control setThemeClass:"your-theme-class"]).
All classes (excluding the ones prefixed with underscores) in Foundation
and AppKit can now be loaded individually except CPOpenPanel and
CPSavePanel. These two classes have some sort of dependency cycle
that seems impossible to resolve without forward declarations (which
we don't have).
- Current theme blend is available via CPApplication -themeBlend.
- List of themes is available via CPApplication -themes.
- CPThemeBlend adds the following methods:
themes
themeNames
- CPTheme adds a number of methods to access theme attributes:
classNames
attributesForClass:
attributeNamesForClass:
attributeWithName:forClass: (was _attributeWithName:forClass:)
valueForAttributeWithName:forClass
valueForAttributeWithName:inState:forClass:
- _CPThemeAttribute -values was added to access the dictionary of attribute values.
- Theme browser application that demonstrates the API.
- In the course of making the test app, added the function CGInsetEqualToInset().