Code review of cross platform code sample

Discussion in 'C++' started by Otto Wyss, Sep 6, 2003.

  1. Otto Wyss

    Otto Wyss Guest

    I've written an application which is intended to act as a code sample
    "how to code applications with a well designed GUI". Since this code is
    intended to also act as a sample for beginners it should not contain any
    quirks or unusual constructs or be misleading or else. It should be as
    clean and as readable as possible. It simple should be how you would
    code.

    I therefore ask for a public code review. Just criticize, make
    annotations, suggest improvements or state if you like something very
    well. Keep in mind the code is still beta but it runs fine on Windows
    and fairly well on Linux/GTK1.

    You can look directly at the code through ViewCVS starting at
    "http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wxguide/wxGuide/editor/s
    rc/app.cpp?rev=1.108&content-type=text/vnd.viewcvs-markup" or get the
    complete source from
    "http://prdownloads.sourceforge.net/wxguide/editor.tar.gz?download" (ca.
    80kB) or download the app from
    "http://wxguide.sourceforge.net/indexedit.html".

    If you want to know more about the purpose go to the URL in the
    signature.

    O. Wyss

    --
    See "http://wxguide.sourceforge.net/" for ideas how to design your app.
    Otto Wyss, Sep 6, 2003
    #1
    1. Advertising

  2. On Sat, 06 Sep 2003 11:43:27 +0200, Otto Wyss wrote:

    > I've written an application which is intended to act as a code sample
    > "how to code applications with a well designed GUI". Since this code is
    > intended to also act as a sample for beginners it should not contain any
    > quirks or unusual constructs or be misleading or else. It should be as
    > clean and as readable as possible. It simple should be how you would
    > code.
    >
    > I therefore ask for a public code review. Just criticize, make
    > annotations, suggest improvements or state if you like something very
    > well. Keep in mind the code is still beta but it runs fine on Windows
    > and fairly well on Linux/GTK1.
    >
    > You can look directly at the code through ViewCVS starting at
    > "http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wxguide/wxGuide/editor/s
    > rc/app.cpp?rev=1.108&content-type=text/vnd.viewcvs-markup" or get the
    > complete source from
    > "http://prdownloads.sourceforge.net/wxguide/editor.tar.gz?download" (ca.
    > 80kB) or download the app from
    > "http://wxguide.sourceforge.net/indexedit.html".
    >
    > If you want to know more about the purpose go to the URL in the
    > signature.


    Your code does not support the official release of wxWindows (which is
    version 2.4.x). Your project requires version 2.5.x, which isn't even
    listed on the wxWindows download page.

    Josh
    Josh Sebastian, Sep 6, 2003
    #2
    1. Advertising

  3. On Sat, 06 Sep 2003 12:09:57 -0400, Josh Sebastian wrote:

    > On Sat, 06 Sep 2003 11:43:27 +0200, Otto Wyss wrote:
    >
    >> I therefore ask for a public code review. Just criticize, make
    >> annotations, suggest improvements or state if you like something very
    >> well. Keep in mind the code is still beta but it runs fine on Windows
    >> and fairly well on Linux/GTK1.
    >>
    >> You can look directly at the code through ViewCVS starting at
    >> "http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/wxguide/wxGuide/editor/s
    >> rc/app.cpp?rev=1.108&content-type=text/vnd.viewcvs-markup" or get the
    >> complete source from
    >> "http://prdownloads.sourceforge.net/wxguide/editor.tar.gz?download" (ca.
    >> 80kB) or download the app from
    >> "http://wxguide.sourceforge.net/indexedit.html".
    >>
    >> If you want to know more about the purpose go to the URL in the
    >> signature.

    >
    > Your code does not support the official release of wxWindows (which is
    > version 2.4.x). Your project requires version 2.5.x, which isn't even
    > listed on the wxWindows download page.


    While I agree with your sentiments, I want to defend the OP. The fact
    of the matter is, if you develop using wxWindows you pretty much have
    to use CVS head. This is because none of the developers is interested
    in fixing bugs or even talking about workarounds for bugs unless they
    have been demonstrated in CVS head. All requests for help with problems
    with the 2.4.x series vanish into a black hole.
    Sheldon Simms, Sep 6, 2003
    #3
  4. Otto Wyss

    Otto Wyss Guest

    Josh Sebastian <> wrote:

    > Your code does not support the official release of wxWindows (which is
    > version 2.4.x). Your project requires version 2.5.x, which isn't even
    > listed on the wxWindows download page.
    >

    You can build my code either with 2.4.1 plus the patches I mentioned in
    "BuildInfo.txt" or with just the WX_2_4_BRANCH which will become 2.4.2.
    I'm currently using the WX_2_4_BRANCH with the patches I made but aren't
    accepted so far. Again all you currently need to build successfully is
    the WX_2_4_BRANCH.

    I don't like the fact that the code can't be compiled with the stable
    release of wxWindows but it's almost impossible to code a decent windows
    menu without the "FindItemByPosition" patch. Since this patch got
    immediately included in HEAD and WX_2_4_BRANCH when 2.4.2 is released
    this problem will be solved.

    Another fact is the WX_2_4_BRANCH contains IMO a very important bug fix
    for wxStyledTextCtrl. Therefore it doesn't make much sense to use a
    plain 2.4.1.

    O. Wyss

    --
    See "http://wxguide.sourceforge.net/" for ideas how to design your app.
    Otto Wyss, Sep 6, 2003
    #4
  5. On Sun, 07 Sep 2003 00:58:31 +0200, Otto Wyss wrote:

    > Josh Sebastian <> wrote:
    >
    >> Your code does not support the official release of wxWindows (which is
    >> version 2.4.x). Your project requires version 2.5.x, which isn't even
    >> listed on the wxWindows download page.

    >
    > I don't like the fact that the code can't be compiled with the stable
    > release of wxWindows but it's almost impossible to code a decent windows
    > menu without the "FindItemByPosition" patch. Since this patch got
    > immediately included in HEAD and WX_2_4_BRANCH when 2.4.2 is released
    > this problem will be solved.
    >
    > Another fact is the WX_2_4_BRANCH contains IMO a very important bug fix
    > for wxStyledTextCtrl. Therefore it doesn't make much sense to use a
    > plain 2.4.1.


    OK, I'm not a wxWindows programmer. I just happened to notice that after
    installing it, your program wouldn't compile. Your trying to use this as a
    tutorial (right?), and generally tutorials shouldn't have complex build
    requirements (I did see the documentation for the build requirements,
    but I hadn't gotten around to doing it yet). If FindItemByPosition will be
    supported in 2.4.2, though, then I suppose it's only a matter of time
    before the point is moot.

    Josh
    Josh Sebastian, Sep 7, 2003
    #5
  6. Otto Wyss

    Robert Vazan Guest

    In comp.programming Sheldon Simms <> wrote:

    > While I agree with your sentiments, I want to defend the OP. The fact
    > of the matter is, if you develop using wxWindows you pretty much have
    > to use CVS head.


    This isn't really true. You can #if wxCHECK_VERSION(2,5,0) ... #endif
    features that depend on recent bug fixes. You can also write your own
    workarounds so that no features are lost. I often do this myself.

    > This is because none of the developers is interested
    > in fixing bugs or even talking about workarounds for bugs unless they
    > have been demonstrated in CVS head. All requests for help with problems
    > with the 2.4.x series vanish into a black hole.


    Well, it's true that stable branch is mostly supported by application
    developers. You have to submit your own patches.
    Robert Vazan, Sep 7, 2003
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jake
    Replies:
    0
    Views:
    526
  2. www
    Replies:
    51
    Views:
    1,440
  3. bazzary
    Replies:
    0
    Views:
    357
    bazzary
    Sep 16, 2008
  4. Tim Chase
    Replies:
    0
    Views:
    57
    Tim Chase
    Feb 16, 2014
  5. Terry Reedy
    Replies:
    0
    Views:
    62
    Terry Reedy
    Feb 16, 2014
Loading...

Share This Page