Bug, perhaps?

BlitzMax Forums/BlitzMax Programming/Bug, perhaps?

[edit] Turns out I needed to force a flush stream...whoops. Hehe.





Okay, I've got a Logger class that takes a string of data, decorates it, and writes it to a log file.

In the following code, GErrorLog is a global instance of that logger, which is instantiated in it's own .bmx file which is imported with the import call at the top of the program.

With the code below the call to GErrorLog.LogData() commented out (as in the codebox below), the logger works as intended and writes the line ""look, this better ******* work!" to the log file (note my slightly irritated tone :).

However, when I uncomment the code below, the same call fails to work. I don't see how uncommenting the code below it could have any effect whatsoever on that line, but it does.

Here's the code
Strict


Import "Framework_TConnection.bmx"

GErrorLog.LogData( "look, this better ******* work!" )

Rem
Global ListeningManager:TListeningManager = TListeningManager.Create()
Global ConnectionManager:TConnectionManager = New TConnectionManager

ListeningManager.SetConnectionManager( ConnectionManager )
ListeningManager.AddPort( 30001 )

While Not KeyHit( KEY_ESCAPE )
ListeningManager.Listen()
ConnectionManager.Listen()
Wend

endrem


The ConnectionManager does indirectly access GErrorLog as well, but all of the ConnectionManager code is compiled either way (it's included in the TConnection_Framework.bmx file).

Anyone have any ideas what might be causing this strange behavior?