Re: [Pyobjc-dev] 1.0 released
Brought to you by:
ronaldoussoren
From: Bob I. <bo...@re...> - 2003-10-10 16:41:18
|
On Friday, Oct 10, 2003, at 11:02 America/New_York, Jack Jansen wrote: > > On Wednesday, October 8, 2003, at 07:45 PM, Ronald Oussoren wrote: > >> http://pyobjc.sf.net/packman/pyobjc-stable-6.6-Power_Macintosh.plist > > Either I'm doing something stupid, or there's a problem somewhere. > > I installed PyObjC binary and PyObjC-extras from this database. Then > I tried to run HelloWorld.py and it died: > Traceback (most recent call last): > File > "/Applications/MacPython-2.3/Extras/pyobjc-1.0/Examples/ > HelloWorld.py", line 78, in ? > if __name__ == '__main__' : main() > File > "/Applications/MacPython-2.3/Extras/pyobjc-1.0/Examples/ > HelloWorld.py", line 41, in main > NSApp.setDelegate_(delegate) > AttributeError: 'builtin_function_or_method' object has no attribute > 'setDelegate_' That's looks like a bug. I'm pretty sure that NSApp is a factory for the NSApplication singleton, not an instance of NSApplication. > And then I ran into some misdesigns in buildapp.py/bundlebuilder.py: > pretending to be a naive user I opened > MacPython-2.3/Extras/pyobjc-1.0/Examples/CurrencyConverter > in the finder. Double-clicking CurrencyConverter.py crashes (*I* know > why, but only when I'm not > naive:-). Okay, I double-click buildapp.py. Doesn't work either > (because it wants a "build" > argument, sigh). Read the error message, option-double-click buildapp, > provide the > "build" argument in PythonLauncher: still doesn't work (*I* know it's > because the > working directory is incorrect, but not when I'm naive...). Why isn't bundlebuilder integrated into distutils anyways? This is for sure something we ought to look into for PackMan's future, since we're changing distutils anyway (integrate py2exe / bundlebuilder / freeze functionality into distutils). > I think fixing problems like this would be good if we want to lure > people to > switch to PyObjC. If we fix the fact that you can't run PyObjC scripts > without > first creating an app bundle then I think the buildapp problems aren't > all > that important, but if we can't fix PyObjC to load the nib files on > the fly > then we should do something else to make a simple double-click from the > finder run the examples (even if this means we have to add "runme.py" > to all > examples, that does all the building work and then fires the resulting > app). It's definitely possible to make them load nib files on the fly, but it sure is ugly. At worst case, you can have it build its own bundle (with --link) and os.execve or use LaunchServices to open it. -bob |