Re: [Pyobjc-dev] Altered classes
Brought to you by:
ronaldoussoren
From: Steven D. M. <sd...@mi...> - 2001-05-12 00:30:06
|
On Fri, 11 May 2001, Bill Bumgarner wrote: > Has anyone tried creating a Python object and setting it as NSApp's > delegate, then seeing if you could grab notifications?? Yes. I haven't been able to get them to work. I had a variant of HelloWorld -- actually based on LBW (LittleButtonMouse) but creating a Python class instance to register as a delegate. Registering the delegate seems to work but it never gets called. After this discussion of name mangling, I was just wondering if I misnamed the methods in Python: "applicationShouldTerminate_" , etc. I tried a simpler program using my own defined notifications and posting it myself so I had more control over what was going on -- it gets a bus error after posting the notification. I tried running it under gdb to see if I could find what was wrong -- my conclusion from that is that I'm going to have to build an objc-runtime from Darwin sources with debugger info and sources online so that I can step thru the objc-runtime code -- which is where things seem to go wrong. ( Not that it's the objc-runtime -- I'm pretty sure the problem is pyobjc-runtime, but to find that bug I think I need to back up from the error in the objc-runtime. ) -- Steve Majewski ( getting more and more sold on the rewrite idea! ) |