Code review of cross platform code sample

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Otto Wyss

    Code review of cross platform code sample

    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.1 08&content-type=text/vnd.viewcvs-markup" or get the
    complete source from
    "http://prdownloads.sou rceforge.net/wxguide/editor.tar.gz?d ownload" (ca.
    80kB) or download the app from
    "http://wxguide.sourcef orge.net/indexedit.html" .

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

    O. Wyss

    --
    See "http://wxguide.sourcef orge.net/" for ideas how to design your app.
  • Josh Sebastian

    #2
    Re: Code review of cross platform code sample

    On Sat, 06 Sep 2003 11:43:27 +0200, Otto Wyss wrote:
    [color=blue]
    > 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.1 08&content-type=text/vnd.viewcvs-markup" or get the
    > complete source from
    > "http://prdownloads.sou rceforge.net/wxguide/editor.tar.gz?d ownload" (ca.
    > 80kB) or download the app from
    > "http://wxguide.sourcef orge.net/indexedit.html" .
    >
    > If you want to know more about the purpose go to the URL in the
    > signature.[/color]

    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

    Comment

    • Sheldon Simms

      #3
      Re: Code review of cross platform code sample

      On Sat, 06 Sep 2003 12:09:57 -0400, Josh Sebastian wrote:
      [color=blue]
      > On Sat, 06 Sep 2003 11:43:27 +0200, Otto Wyss wrote:
      >[color=green]
      >> 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.1 08&content-type=text/vnd.viewcvs-markup" or get the
      >> complete source from
      >> "http://prdownloads.sou rceforge.net/wxguide/editor.tar.gz?d ownload" (ca.
      >> 80kB) or download the app from
      >> "http://wxguide.sourcef orge.net/indexedit.html" .
      >>
      >> If you want to know more about the purpose go to the URL in the
      >> signature.[/color]
      >
      > 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.[/color]

      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.


      Comment

      • Otto Wyss

        #4
        Re: Code review of cross platform code sample

        Josh Sebastian <curien@cox.net > wrote:
        [color=blue]
        > 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.
        >[/color]
        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 "FindItemByPosi tion" 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 wxStyledTextCtr l. Therefore it doesn't make much sense to use a
        plain 2.4.1.

        O. Wyss

        --
        See "http://wxguide.sourcef orge.net/" for ideas how to design your app.

        Comment

        • Josh Sebastian

          #5
          Re: Code review of cross platform code sample

          On Sun, 07 Sep 2003 00:58:31 +0200, Otto Wyss wrote:
          [color=blue]
          > Josh Sebastian <curien@cox.net > wrote:
          >[color=green]
          >> 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.[/color]
          >
          > 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 "FindItemByPosi tion" 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 wxStyledTextCtr l. Therefore it doesn't make much sense to use a
          > plain 2.4.1.[/color]

          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 FindItemByPosit ion will be
          supported in 2.4.2, though, then I suppose it's only a matter of time
          before the point is moot.

          Josh

          Comment

          • Robert Vazan

            #6
            Re: Code review of cross platform code sample

            In comp.programmin g Sheldon Simms <sheldonsimms@y ahoo.com> wrote:
            [color=blue]
            > 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.[/color]

            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.
            [color=blue]
            > 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.[/color]

            Well, it's true that stable branch is mostly supported by application
            developers. You have to submit your own patches.

            Comment

            Working...