Bug? in BRL.Stream / documentation

Archives Forums/BlitzMax Bug Reports/Bug? in BRL.Stream / documentation

n-Halbleiter(Posted 2010) [#1]
Hey there!

I'm a bit concerned about a problem in the documentation or BRL.Stream: Under Tutorials -> BlitzMax Overview there is a small text (with sample code) about TStream, TStreamWrapper and TStreamFactory. The problem is the following:

Run the code (available in the documentation (not at the location the link directs to) or at the bottom of this post) and you will see: The text will not be converted to uppercase. So this whole thing is useless.

After tracking down the problem I found out that the implementations of 'Read[thing]' (except 'Bytes' which is not implemented in TStreamWrapper at all) just redirect to the stream's one. With this you can't just derive your own wrapper and use it like this (sometimes this would be really cool). So, the solution is just to comment this section out. The modified source of the TStreamWrapper Type would then look like this:


(just copied from MaxIDE so that you can easily replace it for testing.)

The code for the example:


With this small modification everything works how it should.

Thanks and out. :)