I'm trying to update/extend the ActionScript bundle and replace the commands that output using the deprecated "Show in Seprate Window".
To do this I'm trying to store the output of the compiler then, depending on success parse the output message differently.
Trouble is the following leaves me with nothing to work with:
complieResult=$( mtasc -cp "$TM_MX_CLASSES" -cp "$TM_CLASS_PATH" -cp "$TM_CLASS_PATH/FP8" -cp "$PROJECT_DIR/src" -cp "$PROJECT_DIR/ classes" -version $flashVersion -trace $traceOption -frame 10 -mx - out "$TM_SWF_OUTPUT" -swf "$TM_SWF_INPUT" "Main.as" )
echo "COMPILE RESULT $complieResult";
whereas
FILELIST=$( ls $HOME )
echo "FILELIST $FILELIST";
works as expected.
Can anyone point me in the right direction?
Cheers, Simon
On 23/1/2006, at 13:17, Simon Gregory wrote:
I'm trying to update/extend the ActionScript bundle and replace the commands that output using the deprecated "Show in Seprate Window".
Sounds good! :)
[...] Trouble is the following leaves me with nothing to work with:
Likely mtasc writes the output to stderr instead of stdout. You can redirect stderr to stdout using 2>&1, so the command would be:
complieResult=$( mtasc 2>&1 -cp "$TM_MX_CLASSES" … )
Likely mtasc writes the output to stderr instead of stdout. You can redirect stderr to stdout using 2>&1, so the command would be:
complieResult=$( mtasc 2>&1 -cp "$TM_MX_CLASSES" … )
Worked a treat!
[... from Ben's email ... ] This should get you the error output nicely formatted for HTML:
mtasc -cp "$TM_MX_CLASSES" -cp [....]
It did! and after wrestling with it for a while I now have a nice clean list of Warnings and Errors to click on.
Which lead me to try to use the TextMate.system( 'cmd', null) to automatically run a python script which cleans unused imports out of classes, but cannot get the following to fire:
echo "<a href="javascript:TextMate.system( '$TM_BUNDLE_SUPPORT/Tools/ test.sh', null );">test</a>"
My assumption is that $TM_BUNDLE_SUPPORT doesn't get escaped properly (Application Support being the culprit) in the name but haven't been successful in any solutions I've tried. Is there an easy way to do this?
One thing to note - running the javascript above without null as the second param crashes TM.
Cheers, Simon
On 24/1/2006, at 15:53, Simon Gregory wrote:
echo "<a href="javascript:TextMate.system( '$TM_BUNDLE_SUPPORT/ Tools/test.sh', null );">test</a>"
My assumption is that $TM_BUNDLE_SUPPORT doesn't get escaped properly (Application Support being the culprit) [...]
Yes -- you'll need to put quotes around it. E.g.:
echo "<a href="javascript:TextMate.system( '"$TM_BUNDLE_SUPPORT/ Tools/test.sh"', null );">test</a>"
[...] One thing to note - running the javascript above without null as the second param crashes TM.
I'm afraid it's a WebKit bug that I can't easily workaround (other than submit a patch to Apple) -- but I'll look into it.