fix cpcollectionview height issue
correction of height calculation
reverseSetValuesFor: handle multiple selection
fix activateIgnoringOtherApps:shouldIgnoreOthe...
formatting+nil equality
Fixed: wrong condition in CPApplication
Fixed: Methods viewDidMoveToSuperview viewDidMoveToWindow viewWillMoveToSuperview viewWillMoveToWindow not called as in Cocoa

Previously, when adding, removing, replacing a CPView, the framework didn't call the methods viewDidMoveToSuperview, viewDidMoveToWindow, viewWillMoveToSuperview and viewWillMoveToWindow as in Cocoa. Now it does.

The main change is that these methods will be called when removing a CPView.

Added unit-test in Tests/AppKit/CPViewTest.j
Fixed: memory leaks with CPNotifications

Previously, when removing a view, Cappuccino didn't clean the notification center. The notification center kept in reference old views.

This PR fix this issue. When a CPView is added to a view, the methods _removeObservers and _addObservers are called. In these both methods we remove and add the observer to the notification center if needed. _removeObservers and _addObservers are called for the view and its subviews. These both methods are called through the method viewWillMoveToSuperview.

When a CPView is removed, we only call the method _removeObservers.
When a CPWindow is closed, we call the method _removeObservers on its contentView.
When a CPWindow is about to be opened, we call the method _removeObservers and _addObservers on its contentView.

Refs #1880
Refs #2024

Test app in Tests/Manual/AttachedSheet2/SheetWindowController.j
Fixed: make sure to remove observers when opening a CPWindow
Fixed: revert commit abdf1156d4d3d33afff55e168881cd7729c28fe0 for CPComboBox
Fixed: added a boolean to avoid to addObservers seveal times
Fixed: added optimization for releasing observers
Fixed: method viewWillMoveToWindow and viewDidMoveToWindow not called when when adding a view to a view without a window where the previous superview had a window
Fixed: added CPView test for the method addSubview
Fixed: _removeObservers called in orderFront, we don't need this as addObservers and removeObservers work with boolean to check if the observers are set or not
bump zIndex by 1 to avoid -1
formatting
Fixed: typo
Fixed: CPBinder unbindAllForObject did not work.

Previously, calling CPBinder unbindObjectForKey would not actually unbind each of the bindings because it was passing the wrong object to the unbind method which would silently ignore the issue. The commit passes the correct parameter to allow unbinding to actually take place.

Fixes #2197.
Merged: manual merged