broken after upgrade to 2.8

BobR removeBadBobR at worldnet.att.net
Fri Apr 13 17:08:21 PDT 2007



Vadim Zeitlin wrote in message ...
> On Fri, 13 Apr 2007 17:00:25 -0400 Chad Wagner wrote:
>
> CW> I agree, however I can sympathize with BobR's plight,
>
>  Sorry but I can't because I don't even know about what it is. There is
> something deeply wrong in being accused of being cancerously insane and
not
> even knowing why. I shouldn't care about it, of course, but is just seems
> unjust to me, it's like a random passerby on the street calling you names
> without any visible reason -- you can always write it off (what else can
> you do anyhow?) but it does leave an unpleasant aftertaste nonetheless.

Sorry about that. I thought I put that post in 'drafts' ( I had not finished
it).
But, since you have a good point, here is one example:

This little 'gotcha' only took me two days to find.
[ other 'casts' were easier to find because they caused compile-time or
run-time errors.]

[from docs]
wxInputStream::GetC
char GetC()
Returns the first character in the input queue and removes it, blocking
until it appears if necessary.
// ------

So, if 'GetC()' returns a 'char', why do I have to cast it (// [1]) in v2.8:

     wxZipInputStream ZFile("data.zip", "OGLrock.raw");
     if(!ZFile.IsOk()){ return false;}
     wxString OGLrock;
     OGLrock.Alloc( ZFile.GetSize() );
     // while( ZFile.IsOk() ){ OGLrock << ZFile.GetC();}
     while( ZFile.IsOk() ){
          OGLrock<<static_cast<char>( ZFile.GetC() ); // [1]
          }

[ BTW, I compiled wx libs in non-unicode mode. ]
Yes, I know 'wxZipInputStream' is being deprecated (that's the cancer. I
like that little class!).
Without the cast, it inputs 4 (or more) bytes to the string as a BIG number.
Then concats more numbers, etc.. ( the (zip) file contains white-space
delimited doubles stored in text format (used for OpenGL triangle mesh)).

With every new release of wxWidgets I have to go back and modify  more and
more code. That prompted the "stay with the old wx libs for the life of an
app" opinion.

If I thought wxWidgets was crap, I wouldn't use it. But, I believe it could
be simpler while still providing all the functionality one could need (like:
why so many 'wxRichText*' classes?).

I don't blame you for putting me there, but, could I crawl out of your
killfile now? It's COLD down here!!
--
Bob R
POVrookie








More information about the wx-users mailing list