List Info

Thread: Digest Number 705




Digest Number 705
user name
2006-08-31 15:12:01

Julian,
I did download 3.07 and tested it there with the same results.  As Dave S. had stated as well, in this same scenario if you assign a member name to the wxScrolledWindow DB doesn't attach the name to the code it generates in the class the wxScrolledWindow is declared in.  This thereby renders the code generator useless because as he stated the program won't even compile, this is because the variable that is used for the wxScrolledWindow in the offending code is never actually created.
On a side note, I apologize for my initial posting.  I hit reply button on one of the daily digest e-mails that I get from the group.  I also forgot to erase all of the text from the digest e-mail that is automatically attached to the reply e-mail; hence, the entire thing looked like crap and made any subsequent reply messages insanely long.
 
Ivon Cullumber
----- Original Message -----
Sent: Thursday, August 31, 2006 5:18 AM
Subject: [anthemion-devtools] Digest Number 705

Re: DB duplicates code

Posted by: "ddotedotsdot" mchsi.com?Subject= Re%3A%20DB%20duplicates%20code">dsilviamchsi.com   ddotedotsdot

Wed Aug 30, 2006 4:30 pm (PST)

>This looks like a bug to me.

Hi!

I'd have to agree. I tried your scenario (in DB 3.07 and
wxWidgets-2.7.0-1) and, yes, the code is duplicated. Mine was
slightly different, though, as I seldom use the generated ID's and
stack variable names. I almost always assign Id names and Member
variable names. In so doing, my project will not compile because the
references to my member variables are not in mainframe.[cpp|h], only
in swindow1.[cpp|h].

No real workaround as DB will just reinsert the offending code each
time you remove it and try to rebuild. Only additions outside the
generated code comment markers are honored, not changes within the
generated code markers.

This is really a side effect comment, not related (exactly) to your
problem. It would be nice if users could place comment markers within
generated code that would prevent DB from overriding their changes. I
say it's a side effect comment because it would offer a workaround to
this problem, but would not cure the actual bug.

Just thought you might like to know you're not imagining things!;)

thx,
Dave S.
2c.

Re: DB duplicates code

Posted by: "Julian Smart" anthemion.co.uk?Subject= Re%3A%20DB%20duplicates%20code">juliananthemion.co.uk   felixcarswell

Thu Aug 31, 2006 3:49 am (PST)

Hi Ivon,

Sorry, sounds like a bug; perhaps someone can confirm if this happens in
3.07 also. I'll look into it.

Regards,

Julian

Ivon Cullumber wrote:
>; This looks like a bug to me.
> I have created a small program using DB; however, the code generation
> seems a bit funky. Here is a rundown of what I did.
> I used the New Project Wizard to create a new app.
> To that application I added a frame named MainFrame. The program
> generated the files mainframe.cpp and mainframe.h.
> I added a menu bar to the frame with four menu catagories. Six menu
> items were added to the second menu catagory.
> After that I added a wxScrolledWindow to the frame, and here's where
> it got wierd.
>; I stated that the scrolled window should be contained in external
> files, swindow1.cpp and swindow1.h, and I named the class sWindow1.
> Then I added a vertical wxBoxSizer to the scrolled window. In that
> sizer I put a horizontal wxStaticBoxSizer and within the Static Box
> Sizer I placed four instances of static text.
> And here's the problem:
> DB initializes the Box Sizers and the Static Text in both
> mainframe.cpp and swindow1.cpp, thereby creating duplicates of each
> item. And when displayed during a run of the program one instance of
> the items is offset from the other making the whole thing look terrible.
> Has anyone else had this problem? If so what's the fix?
>
> I am using DB version 3.06(Unicode) with wxWidgets-2.6.3 on a WinXP
> System.
>
> Thanks,
> Ivon Cullumber
 
 

__._,_.___
.

__,_._,___
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )