[Pyobjc-dev] Two difficulties with document-based app
Brought to you by:
ronaldoussoren
From: David E. <epp...@ic...> - 2002-12-11 18:17:58
|
In order to try to learn how to program in Cocoa and pyobjc, I am attempting to build a simple document-based application, using the 0.7 pyobjc package. Mostly everything's working well, but I am having trouble tracking down two bugs: (1) The usual Cocoa objective-C document-based template, when it starts up, creates a new document window. It also does the same when selected in the dock and it doesn't already have a window. My app does the dock-selection new window thing (without any code on my part, simply by adding a doc type to the target) but does not create a new window on startup. (2) If I open and then close a document window, I get a string of scary looking log messages like: Before DECREF in normal Release with dead python repeated several times. If it were just a matter of some log messages, that would be ok, but then sometimes my program craps out with a bus error. Do either of these look familiar to anyone? I'm guessing the second one has to do with my lack of understanding of when I need to do explicit retain/release and when pyobjc will do it for me, but the new doc window creation process is all done by the nib, it doesn't involve any of my python code creating new objc objects... -- David Eppstein UC Irvine Dept. of Information & Computer Science epp...@ic... http://www.ics.uci.edu/~eppstein/ |