Hi there! I'm trying to port one thing to JavaScript and I'm very surprised that <iostream> things refuse to work when called from callbacks.
In the first example, I'm trying to write a string to `std::cout`. (It can be replaced with `std:cerr`, the result is the same.) It works well when called from main function or from simple JavaScript chunk called from that main function. But it fails when called from setTimeout's callback: https://gist.github.com/skalee/11318312 Also, I've tried my own custom subclass of `ostring` which uses `stringbuf` for buffering. (Actually, this example is more important to me.) Effect is the same — fails in setTimeout's callback, except that error info takes hundreds of lines: https://gist.github.com/skalee/11318888 What I'm doing wrong? Could you help me? Thanks in advance for reply. Sebastian. -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
