Get bmk output with createprocess

BlitzMax Forums/BlitzMax Programming/Get bmk output with createprocess

Curtastic(Posted 2006) [#1]
I made an IDE and I want to get the compile error message.

I am using createprocess with "bmk makeapp " to compile, but how do I get the error message if it doesn't compile?


FlameDuck(Posted 2006) [#2]
Each TProcess object has two pipes you can read, one for stdin, one for stderr. Look in the sourcecode for the actual names.


Curtastic(Posted 2006) [#3]
I looked at the code and tried this but I'm not getting anything from process.err.readline()
Any help would be appreciated. thx
		Local process:tprocess
		Local error:String
		process = createprocess(maxpath + "\bin\bmk makeapp " + pagemain.filename)
		Repeat
			If process.status() = 0 Then Exit
			error = process.err.readline()
			If error <> "" Then
				Print error
			EndIf
		Forever



klepto2(Posted 2006) [#4]
Hi, this is a small sample I have written for the german community and it shows how to readout the err pipe for making
an extended error handling like in WOW etc.

http://www.blitzforum.de/upload/file.php?id=518

Maybe this will show you how to get it to work.


skidracer(Posted 2006) [#5]
The MaxIDE source code is good place to look, search for use of the bytebuffer class.