cappuccino/cappuccino — pull request #2261 by Dogild (2014-11-20 23:24:59+00:00)
Title: New: added method addObserverForName:object::usingBlock: in CPNotificationCenter

Previously, the method addObserverForName:object::usingBlock: didn't exist in Cappuccino.
Now it does.

To observe, you need to use the method - (id )addObserverForName:(CPString)aNotificationName object:(id)anObject usingBlock:(Function)block

To unregister observations, you pass the object returned by this method to removeObserver:. You must invoke removeObserver: or removeObserver:name:object:.

Test /Tests/Foundation/CPNotificationCenterTest.j

Fixed #2259