The problem is with using RETVALS=`gtkdialog` is that you're going to catch everything sent to stdout including whatever programs you are running from within your gtkdialog application. Where does that "OK" come from? Something that your application is executing is responsible for that.rerwin wrote:...
The code for this trace is:As a test, I coded:Code: Select all
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center` eval $RETVALS if [[ "$EXIT" == "RESTART" ]] ; then
which solves the problem. But I have not noticed any other gtkdialog result processing that does that.Code: Select all
RETVALS=`gtkdialog3 --program=MAIN_DIALOG --center | grep =`
I assume the the "OK" is only a confirmation that the invocation did not fail, but a failure would probably output a message to stderr. Or would it?
Richard
I'll tell you how it works: every widget that has a <variable> directive will be printed to stdout on application exit unless you use <variable export="false">. So do you actually want to evaluate everything or is there something in particular?
" | grep =" is going to remove lines such as "OK" which is good.
Do people actually use this method of capturing all of stdout? I don't think it's very common.
See this Frisbee post because I mentioned this before and I saw that peebee had changed the code.
If all you want to evaluate is EXIT then what's wrong with:
Code: Select all
eval `gtkdialog3 --program=MAIN_DIALOG --center | grep ^EXIT=`