Just use the "command" field on the textbox.
I don't think the command field works for some reason; both jes00 and myself I tried it.
This actually won't work because the only accelerator that works when a GUITextEditCtrl is active, is the escape key. sinkAllKeyEvents has no effect on this.
. . .
You can just do:
%tempText = stripChars(%text, ".,:;-_+`\"'?*=><[]{}()%^~@#$%\\/|");
Thanks for the stripChars function; let's include that for the next version. I also still not sure what to do with the newline issue; the best option would be to somehow replace line breaks before sending the app to the host.
So is the issue with newlines that they will be broken off when processed on the server side? Because it seems like you could just use strReplace(%string, "\n", "<br>"); on the server side after it is submitted.
Or if that doesn't work for some reason, you could iterate through the string like this
%lines = getLineCount(%string);
for(%i = 0; %i < %lines; %i++)
{
%newString = %newString @ "<br>" @ getLine(%string, %i);
}
Yeah, when reading the files, new line breaks are saved as a certain ascii character, so it's treated just like the other line breaks in the file. The only solution I think would be to replace the character before sending the file to the host. I did try finding / replacing "\n", "<br>" and other strings, but nothing worked. I don't think searching for "<br>" would work anyway though because it has to be explicitly typed in.
I do know Torque has getASCIIString(%string), but I'm not that familiar with the function.