[Pyobjc-dev] Upgrade to PyObjC 1.0beta
Brought to you by:
ronaldoussoren
From: Bob S. <rsw...@tr...> - 2003-08-08 15:10:39
|
I finally got around to upgrading my application to use PyObjC 1.0 beta 1 from PyObjC 0.9. The upgrade was easy, but I ran into one problem: appleScript = NSAppleScript.alloc().initWithSource_(strScript) result = appleScript.executeAndReturnError_(None) produced this error for the second line: TypeError: Need 0 arguments, got 1 This had not happened in PyObjC 0.9. When I changed it to: result = appleScript.executeAndReturnError_() the code worked and the error went away. I'm not sure I understand why this is so, as that function is documented as: - (NSAppleEventDescriptor *)executeAndReturnError:(NSDictionary **)errorInfo at http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/Classes/NSAppleScript.html Thanks for creating a great tool. Bob Swerdlow COO Transpose rsw...@tr... 207-781-8284 http://www.transpose.com ---------------------------------- Fight Spam! Add this link to your signature (as I did): http://wecanstopspam.org Click through to find out more. ---------------------------------- |