Bad wxSingleInstanceChecker example in help file

Koen Vermeer koen at vermeer.tv
Sat Oct 27 11:59:00 PDT 2007


On Sat, 2007-10-27 at 19:58 +0200, Vadim Zeitlin wrote:
> > 2. OnExit() should return the value of the base class' member function. In
> > the example, it returns 0.
>  It doesn't really matter as the base class version always returns 0 and
> probably always will and this isn't really relevant for this example
> anyhow.

Whether it's relevant for the example is actually besides the point. My
point is that the documentation tells people to return the value of the
base class' OnExit(), and then that same documentation just disregards
this and gives an example which doesn't do this. From a consistency
point of view, either the example or the wxApp::OnExit() description
should be modified. If the wxApp::OnExit() is guaranteed to return 0,
the example is right and the documentation is wrong. If not, the example
may not be wrong in the sense that it works, but it doesn't illustrate
correct programming practises either.

Anyway, I guess my point is clear. Of course, whether you modify either
part of the documentation is up to you. I just try to report stuff I
feel is incorrect (albeit maybe not strictly wrong).

Best,
Koen








More information about the wx-users mailing list