stdout for desktop app?

Hi all,

I have lots of xojo console applications. All of them can be executed with ‘-v’ as input parameter in a terminal window and they return the name of the app and version information, without actually executing the program. Makes it easy to run a script and list all programs and their versions (around 20 programs).

Is it possible to do the same with Desktop apps and web apps? After I detect the ‘-v’ input parameter I try to use stdout to return a string to the console window that executed the app but it seems you can only do that with console apps.

Any other method/workaround/idea is greatly appreciated.


Web apps are just console applications, so you should be able to use the same code there. For desktop apps, what platform are you targeting?

We have StdOutMBS class in our plugins for printing from desktop apps. Maybe also the built-in Stdout works.

You are right Joe, web apps are actually consoles. I have tried it and works fine. I am targeting Linux by the way.

Your StdOutMBS works perfectly Christian!


PS.- In case any of you two or anyone else knows the solution to the next little thing…

I always get the next message with my desktop apps when running them from the console (OpenSUSE 12.3):

GLib-CRITICAL **: g_hash_table_insert_internal: assertion `hash_table != NULL’ failed

They run ok and everything, I just would like to not have any error message there.

Thanks again!

Does this happen before App.Open/Constructor is called? Than it may be a bug in Xojo runtime.
Please report this via feedback with all the details you have.