lib/sugarcube/notifications.rb in sugarcube-0.9.2 vs lib/sugarcube/notifications.rb in sugarcube-0.9.3

- old
+ new

@@ -10,17 +10,17 @@ else NSNotificationCenter.defaultCenter.postNotificationName(self, object:object) end end - def add_observer(observer, message, object=nil) - NSNotificationCenter.defaultCenter.addObserver(observer, - selector: message, + def add_observer(target, action, object=nil) + NSNotificationCenter.defaultCenter.addObserver(target, + selector: action, name: self, object: object) end - def remove_observer(observer, object=nil) - NSNotificationCenter.defaultCenter.removeObserver(observer, name:self, object:object) + def remove_observer(target, object=nil) + NSNotificationCenter.defaultCenter.removeObserver(target, name:self, object:object) end end