Re: [Boa Constr] Mixing in unsupported widgets and other questions
Status: Beta
Brought to you by:
riaan
From: Riaan B. <riaan@e.co.za> - 2001-01-06 20:59:47
|
Hi Scott, rest assured, you are supposed to add your own code to the generated code. In brief, just don't touch the _init_* methods. Harris Scott R CIV AFRL/SNJM wrote: > > I'm looking for some documentation or guidance regarding the overall > intended use of Boa Constructor. I'm able to build simple demo apps, but I keep > getting the feeling that I'm using the tool incorrectly. > > For example, my goal is to build a GUI around an app I'm writing that uses the visualization toolkit (VTK). > If I build the GUI and then add code to insert a wxVTKRenderWindow everything works fine. Going back to the > designer and making changes causes my added code to be deleted. Where did you put the code that got lost? > Where can or can't I put code I've written? All methods starting with _init_* are generated and maintained by Boa. Their bodies are regenerated when you open the designer and post changes. When events are defined, an On* method will be added to your class, Boa does not touch the bodies of these methods. Any other methods will be left as they are. > Can I modify the code written by Boa Constructor, or will that break something? Yes you may edit generated code (_init_* methods). As long as the structure is consistent with generated code it will be parsed when the Designer is opened. This is not advised though. (Humans aren't as consistent as computers) > > What are good strategies for mixing my code with Boa's code? In your case just define your wxVTKRenderWindow in __init__ below the call to _init_ctrls. You may add any number of classes/functions to a generated module. You may add any attributes or methods to a generated class. > > In addition, is there a simple way to rename the classes I'm creating. If I start building an about box I'd like to > call it wxMyAboutBox or something like that. Boa calls it wxDialog1. Is there a simple way to change the name > of objects? In the Inspector, change the Name property of the Frame, Dialog or control. To change the name of the module, do a Save As... > > I guess what I'm really looking for is a few pages of documentation that describe the design philosophy, high level operation of > the program, and how to use it to build large, real programs. I will add this to the todo list. > > As I come up to speed, I'd be happy to help out and write up some additional documentation. It might also be useful to > make the guide available as a separate download. I found it by accident because it's not part of the 0.4 download. Kevin Gill wrote the Guide/Tutorial since the 0.0.4 release, it will be part of 0.0.5. > > Thanks for your help in advance, > -Scott Harris > > _______________________________________________ > Boa-constructor-users mailing list > Boa...@li... > http://lists.sourceforge.net/mailman/listinfo/boa-constructor-users -- Riaan Booysen ___________________________________________________ Boa Constructor - RAD GUI building IDE for wxPython http://boa-constructor.sourceforge.net |