Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Komag
Roku Guru

Re: Bug? Unreliable "tab" in text strings

Yeah, I wondered about what would happen with a too-long word, but I never tried it!

BTW, congrats your 2000th post! :mrgreen:
0 Kudos
Komag
Roku Guru

Re: Bug? Unreliable "tab" in text strings

I've updated splitBlockText() as you suggested, works great, now I can simply add a few spaces wherever I intent a new paragraph to start, nice! Thanks 😄

"EnTerr" wrote:
Regarding the mysterious "n"-fication - i suspect somewhere there is a left-over code from your experiments with viewtopic.php?f=34&t=84213#p481933
If i were troubleshooting this, first step when this happens during a run would be to check if the 1st char in the splitTextLines is indeed "n" or a tab - by either interrupting the program (ctrl-C) and checking variables - or hot-wiring when one of the remote keys is pressed to dump the array to console. That way could judge if the issues is in Draw2D text routines or in the B/S program


Yes, I thought of that before and did Ctrl-C to see the text under the hood - no "n" in sight. That, plus the fact that the bug was unpredictable and inconsistent between channel loads, plus the fact that the "n"s only showed up when I tried to use leading Chr(9) or Chr(11) or Chr(12) or a few others tells me it's a bug with how those characters are handled in the Roku.
0 Kudos
EnTerr
Roku Guru

Re: Bug? Unreliable "tab" in text strings

"Komag" wrote:
Yeah, I wondered about what would happen with a too-long word, but I never tried it!

Well try it out, what you waiting for? Mine was just an armchair theori... um, i mean "wetware static analyzis" :idea:

BTW, congrats your 2000th post! :mrgreen:

It was? Huh, true. Thank you - and very observant of you! Looking at the sidebar, seems soon i will be celibating 5 years in this forum too. Wheel in the cake! 🙂
0 Kudos
Komag
Roku Guru

Re: Bug? Unreliable "tab" in text strings

Interesting - It creates a blank line for every letter until the remaining letters do fit, then puts them on a line and then it moves on. I tried PNEUMONOULTRAMICROSCOPICSILICOVOLCANOCONIOSIS, and I ended up with about 20 blank lines and then "OPICSILICOVOLCANOCONIOSIS". So that could appear ugly if I really use a too-long word, but at least it will never fully break the system. I'll probably leave it as-is, I don't expect to ever need a very long word in a narrow text window.

(When I tested it all lower case, more letters fit - about 15 blank lines and then "icroscopicsilicovolcanoconiosis")
0 Kudos
EnTerr
Roku Guru

Re: Bug? Unreliable "tab" in text strings

Oh? Uh.... Ahaaa!
it's the replacing of "IF newline THEN linePos = linePos +1" with "linePos = linePos + 1" that "fixed" it. beneficial side effect.
hahahaha... my analysis of the original was right but did not consider the change - now in the loop it always advances the position by 1. And yes, it's better to screw formatting than to bomb
0 Kudos