Re: [Boa Constr] 2 problems-- wxMenu and python crashing
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2002-07-06 00:13:45
|
Hello John, John Boik wrote: > > Thanks Riaan. > I did go to the web site and made the suggsted change in the > UtilCompanions.py file. Now I can add a menu. It works great. Cool! > I did try your suggestion on the initialization lines for the canvas. I had > to change them a bit to get it to work [see below...wxFrame1 (which is self) > did not have an attribute "diagram"]. Im not sure if I can draw yet, but > the application does execute at least. No errors. The problem is though > that by adding the new code into the init section, Boa no longer will allow > me to use the Frame Designer. Please follow the instructions that I posted previously, your code should then be equivalent to this: def __init__(self, parent): self._init_ctrls(parent) self.diagram = wxDiagram() self.diagram.SetCanvas(self.scrolledWindow1) self.scrolledWindow1.SetDiagram(self.diagram) As the Boa application help says, you should not add code to the methods that Boa generates and maintains; the _init_* methods. In the help you are also encouraged to make your the changes in the __init__ method after the self._init_ctrls call. > If I wanted to fix the crash on exit problem Add this snippet of code to the bottom of Preferences.py try: sys._wxApp_Cleanup = wx.__cleanMeUp except: pass to fix it. > I could upgrade to the new CVS > version, but Im not sure how to do that. I went to the CVS site and I see I > can download several different modules, but which ones do I want and how do > I install them in Windows? Do I just copy them over the old folders? Learning to use CVS is of value to any developer IMO. Boa is not released that regularly, so if you need support for the latest wxPython or new features/fixes then it's up to you to learn CVS. There's plenty of help on the web and in the Boa application help. I do suggest leaving it until you are more familiar with everything. > I could also downgrade to Python 2.1, but Im wondering if I would have to > uninstall 2.2 and wxWindows and Boa etc, since they are all in the same > Python22 directory. You can have more than one Python installation at a time, but as I said, this is a last option. Boa 0.1.0 was developed on wxPython 2.3.2 and Python 2.1, so that is where it will run the best. That said, you now have the major hickups of 0.1.0 patched so you should be fine. > Again, pardon my lack of experience...with a little help I will learn fast. Best advice I can give would be to make more use of the SourceForge tracker and the Boa application help. (esp. Docs/boa/apphelp/MixingSource.html). Learning Python/wxPython should be fun, so enjoy it! > > Best, > John Cheers, Riaan. |