Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Code review of cross platform code sample

Reply
Thread Tools

Code review of cross platform code sample

 
 
Otto Wyss
Guest
Posts: n/a
 
      09-06-2003
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.
 
Reply With Quote
 
 
 
 
Josh Sebastian
Guest
Posts: n/a
 
      09-06-2003
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
 
Reply With Quote
 
 
 
 
Sheldon Simms
Guest
Posts: n/a
 
      09-06-2003
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.


 
Reply With Quote
 
Otto Wyss
Guest
Posts: n/a
 
      09-06-2003
Josh Sebastian <(E-Mail Removed)> 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.
 
Reply With Quote
 
Josh Sebastian
Guest
Posts: n/a
 
      09-06-2003
On Sun, 07 Sep 2003 00:58:31 +0200, Otto Wyss wrote:

> Josh Sebastian <(E-Mail Removed)> 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
 
Reply With Quote
 
Robert Vazan
Guest
Posts: n/a
 
      09-07-2003
In comp.programming Sheldon Simms <(E-Mail Removed)> 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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
In order to cross platform, Ruby is designed to be interpreted inruntime, so Ruby code is exposed on the server. This brings a security dangerwhich is not acceptable. Erwin Moller Ruby 9 05-08-2008 01:17 PM
expanding c code to be "more cross-platform" lvirden C Programming 10 07-30-2007 01:25 PM
does java program run on 64-bit platform as fast as on 32-bit platform jcc Java 15 05-12-2006 08:52 AM
looking for asp.net sample with vb.net backend sample is there one? Jake ASP .Net 0 02-09-2006 10:44 PM
JavaScript Document Code Not Cross Platform bradwiseathome@hotmail.com Javascript 8 05-15-2005 04:06 PM



Advertisments