Re: [Pyobjc-dev] HelloWorld.py segfaults
Brought to you by:
ronaldoussoren
From: Chris R. <cp...@em...> - 2003-06-30 13:42:41
|
Uh-oh--can you explain to the uninitiates why these two code sequences aren't identical? On Monday, June 30, 2003, at 05:27 AM, Just van Rossum wrote: > Ronald Oussoren wrote: > >> This seems to be a reference counting issue, maybe NSApplication >> doesn't retain its delegate. > > It doesn't. (It seems that delegates are not retained in general.) > >> 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. > > I'll check in a similar fix. > > Just > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/ > 01 > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev > > Cheers! --Chris Ryland / Em Software, Inc. / www.emsoftware.com |