Re: [Pyobjc-dev] HelloWorld.py segfaults
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-06-30 07:41:47
|
On Monday, Jun 30, 2003, at 09:30 Europe/Amsterdam, Jim Tittsler wrote: > I succeeded in updating to the CVS version of Python 2.3 and > pyobjc by deleting all of the old versions and starting over. > It must have been operator error or a mismatch with earlier > installed versions. Sorry for the noise. > > > Or at least I think I was successful. Most of the examples > work, but Examples/HelloWorld.py segfaults (while setting up > the hello button's target?). This seems to be a reference counting issue, maybe NSApplication doesn't retain its delegate. If you change the code to: dgate = AppDelegate.alloc().init() NSApp.setDelegate_(dgate) instead of 'NSApp.setDelegate_(AppDelegate.alloc().init())' the example works as expected. Ronald |