Code review of cross platform code sample

O

Otto Wyss

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
 
J

Josh Sebastian

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
 
S

Sheldon Simms

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

Otto Wyss

Josh Sebastian said:
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
 
J

Josh Sebastian

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
 
R

Robert Vazan

In comp.programming Sheldon Simms said:
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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top