[Pyobjc-dev] using services from Python with NSPerformService
Brought to you by:
ronaldoussoren
From: Mathieu L. <ze...@ne...> - 2002-12-04 21:35:38
|
import objc from AppKit import * NSPasteboard = objc.lookUpClass('NSPasteboard') paste = NSPasteboard.pasteboardWithName_("carotte") carotteBoardType = [ NSStringPboardType] paste.declareTypes_owner_(carotteBoardType,objc.nil) a = paste.setString_forType_("Hello World!",NSStringPboardType) print "the pastboard work :", a b = NSPerformService("Make New Sticky Note.",paste) print "the service work :",b ---------------------------------- but it doesn't work, and i don't know where can i find the mistake, there's no error information nor logs. Is there any method for debugging pyobjc code? M. |