On Oct 3, 2008, at 11:28 PM, Richard Esplin wrote:

> There are three border sizers in that form. I added two of them  
> through the UI
> normally. The third (the furthest to the right) I first added within  
> the
> scrollpanel and I decided that I didn't like it there. Rather than  
> recreating
> everything, I moved it in the XML file to look like the other two  
> sizers. I
> was able to reproduce the problem with the cdxml before I edited it,  
> so I
> thought that I had eliminated my hand-tweak as the source of the  
> problem. I
> did a lot of playing with various controls in the UI, and I probably  
> messed
> something up.

        Yes, it's very possible. One thing that I quickly realized when  
creating the Class Designer is that it is very difficult to model all  
the various nestings of containers and sizers to enable the creation  
of the designs people would want to use. When editing a non-trivial  
design by hand, a backup copy is essential. Hell, I still screw that  
up from time to time, and I created the format!

        Probably a better approach to editing is to use the cut/copy/paste  
features of the designer. When moving sizers, this can only be done  
via the object tree, as sizers are not visible on the design surface.  
The general idea is to create a slot where you want the moved 'stuff'  
to be, and then cut it from its current location, followed by a paste  
in the new location. The 'add slot above/below/etc' and 'move up/left/ 
etc one slot' are also very useful for making such changes.

> Thank you for your help. I'm trying to rethink the application so  
> that the UI
> isn't so painful. My users need to see a lot of information at once.  
> I can
> eliminate the border sizers if they are what are causing the problems.

        The border sizers didn't cause the problem; they are used all the  
time. It was the inclusion of a separate entry for a dBox control that  
wasn't contained in a sizer. I don't know if you added it or if it was  
an artifact of trying to save the edited .cdxml, but as the other  
border sizers were OK, I'm inclined to think the latter was the cause.

> How did you trace it to the border sizer? Is there some way to  
> enable logging,
> or to get enough information to debug this on my own? Do you use pdb  
> or
> PyDev?

        If writing the Class Designer has done anything, it's increased my  
debugging skills tenfold! I usually start by adding print statements  
in strategic places, and then zeroing in on the problem from there.  
The pdb module is also used heavily at times; so much so that it is  
wrapped into Dabo! Without having to import anything, you can add  
'dabo.trace()' anywhere in your code to drop into pdb.

> Also, is there any current documentation on hand-coding dabo  
> interfaces?

        Many Dabo users still hand-code, mainly because they started before  
the Class Designer was mature enough to be reliable. That's  
unfortunate, because the only way for it to get better is for lots of  
different developers using it in different ways and uncovering those  
hidden bugs.

        I'm sure Paul and John, who hand-code their UIs, will chime in. If  
you have any specific questions, post away! You can also look at some  
of the UI tools (CxnEditor.py, ReportDesigner.py, and even the Class  
Designer files) to see some examples of creating the UI in .py files.


-- Ed Leafe





_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to