=================== Console 0.1 READ ME =================== About Console: This is my first attempt at creating something to funnel printf(...) to a window; it helps me debug a little easier so I don't have to switch back and forth to the Terminal app. I could run from the command-line, but then I'd have to switch back and forth between mouse and keyboard while testing my program, and I'm lazy. For each thread that you create, a window will appear and all printf(...) calls done within that thread will appear in that window. It's a very simple window; you can't edit or copy, just view (it uses a BListView). The window will stick around until the application quits (notice there's no Close box). Look at the source code and you'll see why... Okay, if you don't see why, it's because my Console class can't tell if the window it brings up is still around, so closing it at any other time other than when the application quits is dangerous. I didn't bother writing any custom classes other than Console, so this is the limitation you're stuck with now. In addition, I don't know what order your windows will close when the application quits. If the console goes down first and you are still doing printf(...) calls, most likely you'll get an exception and dump into the debugger. Avoid this, or avoid my library. Last note: multiple threads create multiple consoles, all at the bottom right of your screen. You'll probably want to move them around if you have more than one. Features/fixes for the future: * Specialize where needed to make it safer. * Add a "Clear Console" button -- most of the code is already there to handle this (commented out), but it would require subclassing the window to accept the message from the button. Next version. * Make Console a BWindow subclass (rather than a container for a BWindow) ??? Would this make it any more useful? * Make Console a ostream subclass ??? * Dump this version and work on a full featured version ??? Using Console: Put library Console.o into your project and relink. Most likely it will need to appear above the standard libraries, but it seems to find it anyway. To go back to using normal printf(...) facility, remove the library and relink. Comments and Questions: If you have any questions about this library, please ask. You can contact me via email ( mmoss@io.com ). If you have any suggestions for future versions of this library, please let me know. I have provided the source so that you can experiment and modify to suit your needs. It's not commented everywhere, sorry. I suppose I need a disclaimer of some sort. I can't be held responsible for any loss you might encounter from using this library. I am providing the source code -- you should examine it first and decide whether or not I'm trying to give your machine an ulcer. Don't like it, don't use it. Finally, if you see any defects in the code that might truly give someone's machine an ulcer, please let me know -- I'll fix those right away. Matthew D Moss Ground Cover Software mmoss@io.com