[Pyobjc-dev] how do I get a NSDistributedNotification?
Brought to you by:
ronaldoussoren
From: Samantha A. <sja...@ma...> - 2009-07-06 21:52:32
|
Tried a simple interactive approach which did nothing. Is this possible to do and if so what is the minimum necessary to do it? I tried: >>> from Foundation import * >>> class O(NSObject): ... def printNotif(self,notice): ... print notice >>> nc = NSDistributedNotificationCenter.defaultCenter() >>> nc.addObserver_selector_name_object_(o, o.printNotif, "SomethingChanged", nil) and posted the notification from another python shell. Nothing received. Runloop missing? Something else? |