How to open files with extended TStream

BlitzMax Forums/BlitzMax Beginners Area/How to open files with extended TStream

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

!!!

OpenStream doesn't return a my_stream object downcast to TStream - it returns a TStream! You can't cast it into my_stream. You can attempt to cast TStream to my_stream - that's why it compiles - but it won't work unless that TStream is a downcast my_stream.

There's a stream factory list in OpenStream (check the code), but if you're only extending TStream then that's useless, because it'll return a TStream before anything else.

I'm not really sure at all how to have access to an extended stream object without creating it yourself.