Disclaimer: As always, I’m not supposed to talk about this SDK, but the accompanying docs do not cover the material very well, and bing/goog returns zero info. I had to spend several hours figuring this out (and almost gave-up, twice). Hopefully, this might save someone a few hours, or prevent someone from giving-up. So, if this seems a little vague to you, it is intentional. Please just ignore it and carry-on.
We needed a means to display a bunch of information to a user/customer. The default screens, and confirmation screen only allow 7 lines. That would not be enough for my current needs. Digging through the SDK docs, I found something called the TC.K3Z screen. It sounded great. I could send a “M25” message and show reams of text. One little problem: I can’t send the text as a parameter to the M25 command. It had to be part of a TC#.XML file.
I dug around until I found an example: the existing TC1.XML file. The content was really simple. I already know how to upload a file, using the P62 params, and the ProcessMessage() call. The only problem is that, all of my examples have a M97 command afterwards. Without M97, it doesn’t seem to pick up the new file/settings. I don’t really want to wait for a M97 to complete (40 sec). I was fortunate to discover that you DO NOT need to do a M97 after uploading a TC#.XML file. It grabs a fresh copy every time. That is good news.
Last hurdle: message formatting. Since the TC file was XML, clearly it would choke on greater-than and less-than symbols. Those can be escaped using HTML escape sequences (< for <, and > for >). However, line breaks didn’t work. at. all. I tried <br> and I even tried <br>, like I found in the SECURPROMPT.XML file. Nope. It didn’t work and it hid any content like that. Since the display was line-breaking at 70 chars per line, I was afraid that I might have to resort to line splitting and padding (add spaces until every line was 70 chars long). When I tried that, the display was adding an extra space at the beginning of every line except the first. Weird! When I removed all CRLFs, the extra space went away. Fortunately I found a better way for all of it.
For some reason I tried the literal of “\n” and discovered that would actually cause a line-break to be displayed on the display. So I did a find/replace of CRLF with the string \n.
This line will display\nmulti-line messages which are < 70 chars long.
This line will display multi-line messages which are < 70 chars long
I’m not sure why they would design it like that. It is like the folks who designed it, sort-of mashed some HTML and C escape sequences, and just figured everyone would find that to be intuitive. *sigh*
Anyway, that solved it for me. I hope you found this useful and it saved you some time.