Replying to myself is always fun.
I decided to try a more minimal test, eliminating everything but PyObjC and Cheetah. It does indeed appear to be the case that I get a Bus Error if I render a Cheetah template from within an action called by a menu item. This happens even when Cheetah is 100% python.
The bus error occurs after my action returns. This leads me to believe that either there's something else I need to do in my class to handle that action properly, or there is a bug in Cheetah or PyObjC.
Even though Twisted is not at all at issue here, I'd still be curious to hear if I'm setting up event handling properly...
Kevin
Kevin Dangoor wrote:
I'm trying to mix Twisted and a Mac interface. I'm using PyObjC 1.2 and Twisted's trunk as of a few days back. All of this with Python 2.3. The combo appeared to be working until this morning. Intriguingly, the problem appeared when I added Cheetah (the template engine) to the mix. If I remove Cheetah *or* I remove PyObjC, everything appears to be happy.
The basic order in which I'm doing things is:
1) install cfreactor,
2) load up my nib-based controller class,
3) tell the reactor to start listening on a TCP port,
4) (reactor.run) -- I had this line in there but then removed it without a difference in behavior
5) AppHelper.runEventLoop
I'm not exactly sure how or why introducing Cheetah could have this effect. I even moved Cheetah's one C module out of the way (falling back to straight Python code), but that didn't seem to have an effect. I figured it was time to double check that I'm doing the right things in getting things running.
Is there anything glaringly obvious in that list of steps that should be different or in a different order?
_______________________________________________ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig