More ClassDesigner woes

View: New views
11 Messages — Rating Filter:   Alert me  

More ClassDesigner woes

by Richard Esplin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm still having trouble with the ClassDesigner using Dabo from SVN. It lets
me build the UI just fine, and I end up with a cdxml that runs. But when I
try to re-open the cdxml in ClassDesigner, I get a similar error to what Eric
fixed earlier:

Abbreviated Traceback:
  File "/usr/local/bin/ClassDesigner", line 974, in recreateChildren
    sz = obj.ControllingSizer
AttributeError: 'NoneType' object has no attribute 'ControllingSizer'

Eric: Is this related to the changes you made yesterday?

I would expect that it needs a
try:
  sz = obj.ControllingSizer
except AttributeError:
    sz = None

But I don't know the framework well enough to see negative consequences from
ignoring the exception.

If you need my complex cdxml to reproduce this, please let me know.

Am I right that it is a ClassDesigner bug, or did I do something wrong?

Thanks,

Richard


_______________________________________________
Post Messages to: Dabo-users@...
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/200810031736.03861.richard-lists@...

Re: More ClassDesigner woes

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 3, 2008, at 6:36 PM, Richard Esplin wrote:

> I'm still having trouble with the ClassDesigner using Dabo from SVN.  
> It lets
> me build the UI just fine, and I end up with a cdxml that runs. But  
> when I
> try to re-open the cdxml in ClassDesigner, I get a similar error to  
> what Eric
> fixed earlier:


        OK, I've tracked it down to an incorrect class being recorded. The  
border sizer creates a box, but that box is being saved in the cdxml  
file, which is incorrect. Let me dig a little more and see what I need  
to do to fix this.

-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/76BA8894-444A-42CE-850E-7FA31D257855@...

Re: More ClassDesigner woes

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 3, 2008, at 8:11 PM, Ed Leafe wrote:

> OK, I've tracked it down to an incorrect class being recorded. The
> border sizer creates a box, but that box is being saved in the cdxml
> file, which is incorrect. Let me dig a little more and see what I need
> to do to fix this.

        Wow. First off, let me say that this is the most complex form I've  
seen in a while! It took a while to finally load; for a time I thought  
that it had hung!

        Once I commented out the line that creates the dBox (line #39), the  
form loaded correctly, albeit slowly. I thought that perhaps the box  
sizer had caused a dBox control to be saved, but I've just tried  
creating several forms with border sizers, and none of them created a  
dBox entry in the .cdxml file. I thought that perhaps you added the  
box directly, but that would not have been possible, as the box was  
not contained in any sizer (which was the cause of the error you saw).

        I know that this is a very complex form, but do you remember anything  
about when you created that border sizer that seemed odd? I can't seem  
to reproduce the problem.

-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/E5FA7A1D-6219-4FCD-80C8-F2217B6DD102@...

Re: More ClassDesigner woes

by Richard Esplin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm sorry that the problem proved so troublesome. I had hoped it would be as
painless as the last couple.

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.

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.

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?

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

Thank you again,

Richard Esplin

On Friday 03 October 2008 20:13:48 Ed Leafe <ed@...> wrote:

> On Oct 3, 2008, at 8:11 PM, Ed Leafe wrote:
> > OK, I've tracked it down to an incorrect class being recorded. The
> > border sizer creates a box, but that box is being saved in the cdxml
> > file, which is incorrect. Let me dig a little more and see what I need
> > to do to fix this.
>
> Wow. First off, let me say that this is the most complex form I've
> seen in a while! It took a while to finally load; for a time I thought
> that it had hung!
>
> Once I commented out the line that creates the dBox (line #39), the
> form loaded correctly, albeit slowly. I thought that perhaps the box
> sizer had caused a dBox control to be saved, but I've just tried
> creating several forms with border sizers, and none of them created a
> dBox entry in the .cdxml file. I thought that perhaps you added the
> box directly, but that would not have been possible, as the box was
> not contained in any sizer (which was the cause of the error you saw).
>
> I know that this is a very complex form, but do you remember anything
> about when you created that border sizer that seemed odd? I can't seem
> to reproduce the problem.
>
> -- Ed Leafe
>
<snip>



_______________________________________________
Post Messages to: Dabo-users@...
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/200810032228.15672.richard-lists@...

Re: More ClassDesigner woes

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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: Dabo-users@...
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/B1F501B3-4EC4-4F0D-821D-48F1C47F0801@...

Re: More ClassDesigner woes

by Richard Esplin-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for all of the helpful information.

In the spirit of helping the ClassDesigner get more reliable, I compiled a
list of smaller issues that I've come across. Based on previous
discussions, it sounded like this is the best way to deal with this sort of
thing. If I should be posting these in Trac, let me know.

Thanks,

Richard Esplin

----
Selecting File->Save as Class in the class designer causes a segmentation
fault. (I logged this one in Trac last week #1171).

Ending Form-code.py with a comment causes a syntax error at runtime. (I logged
this one in Track last week #1172).

Opening ClassDesigner with a non-existing filename that does not end in .cdxml
apperas to work fine, but clicking save doesn't create the file. The
<filename>-code file is created however. I would expect that it would just
append .cdxml and save.

Opening ClassDesigner with a non-existing filename that does end in .cdxml
works, but the Properties Grid in the Object Info dialog has each row at a
maximum height so that it is unusable. The arrows on the scroll bar are
non-responsive in this state.

Shft+Ctrl+R doesn't run the application, even though it's the listed shortcut
in File->Run.

On Saturday 04 October 2008 08:45:18 Ed Leafe <ed@...> wrote:
<snip>
> 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.
<snip>
> -- Ed Leafe




_______________________________________________
Post Messages to: Dabo-users@...
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/200810050030.43621.richard-lists@...

Re: More ClassDesigner woes

by Mike Mabey :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Richard,

What operating system are you using?  I'm running WinXP.

On Sun, Oct 5, 2008 at 12:30 AM, Richard Esplin <richard@...> wrote:
>
>
> Shft+Ctrl+R doesn't run the application, even though it's the listed
> shortcut
> in File->Run.


This has always worked for me since I started using Dabo a few months ago.
I've never tried any of the other operations you listed, so I can't speak
for them, but I thought my feedback on this might help narrow down the
possible causes.

Mike M.


--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
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/89fe67110810061549m216b007eif09f12b267f98b7@...

Re: More ClassDesigner woes

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 4, 2008, at 10:45 AM, Ed Leafe wrote:

>> 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.

        I tracked down the problem with the extra box - when switching a non-
bordered sizer to a border sizer, the box was sometimes being created  
with the wrong parent, and the Class Designer saw it as a separate  
item. I've just posted a fix for that.

-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/5D9DEA99-47D1-4F77-A1BB-BC371FD4B852@...

Testing and Debugging

by --26 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm currently trying the dabo ui out by running my python scripts with the Dabo Runtime Engine (right click on the script). Hwo do I go about getting debugging/tracing information with my app?

All I'm getting is something like:
Program C:\...\daborun.exe
This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information.

Thanks,
S



      Make the switch to the world's best email. Get Yahoo!7 Mail! http://au.yahoo.com/y7mail

--- StripMime Report -- processed MIME parts ---
multipart/alternative
  text/plain (text body -- kept)
  text/html
---

_______________________________________________
Post Messages to: Dabo-users@...
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/452141.60117.qm@...

Re: Testing and Debugging

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 12, 2008, at 9:31 PM, - wrote:

> I'm currently trying the dabo ui out by running my python scripts  
> with the Dabo Runtime Engine (right click on the script). Hwo do I  
> go about getting debugging/tracing information with my app?
>
> All I'm getting is something like:
> Program C:\...\daborun.exe
> This application has requested the Runtime to terminate it in an  
> unusual way. Please contact the application's support team for more  
> information.


        Well, it would help to know a bit more about what you're trying to  
do. Are these scripts that have been tested under other Python  
installations? What are these scripts attempting to do?

-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/06083ECE-B918-4202-8088-4DDF7815AFCD@...

Parent Message unknown Re: Testing and Debugging

by Ed Leafe :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Oct 15, 2008, at 3:15 AM, - wrote:

> Well, it is running the main application interface. I think that is  
> being triggered by some exception within my application.

        It very well might be, but I can't say one way or the other without  
some more specifics about your application.


-- Ed Leafe





_______________________________________________
Post Messages to: Dabo-users@...
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/DD1583C7-B477-40B3-8AB4-B0F13B8D0F79@...
LightInTheBox - Buy quality products at wholesale price!