Saw a couple posts on this, but not sure I understood what the equivalent of endofline is in IOS or how to accomplish the same thing in IOS as the desktop.
You might want to check out this link: http://developer.xojo.com/migratingtonewframework
It specifically talks about EndOfLine and other equivalents.
Thank you Travis!
I used this:
Dim CR As Text = Text.FromUnicodeCodepoint(13)
for iOS is should be 10 (LF) not 13(CR)
which in the OLD framework was EndOfLine.Unix
Yes just confirming that in my experience it needs to be &uA or Text.FromUnicodeCodepoint(10) and not Text.FromUnicodeCodepoint(13).
for readability… I’d create a function or computed property named EndOfLine that returns the mentioned value
Function EndOfLine() As Text
return Text.FromUnicodeCodepoint(10)
End Function
Const EndOfLine = &uA
works just fine too
[quote=256482:@Norman Palardy]Const EndOfLine = &uA
works just fine too[/quote]
And is much more efficient.
…except that &uA doesn’t seem to work inside graphics.drawTextBlock commands. Whereas Text.FromUnicodeCodepoint(10) does.
Bug report?
I stand a bit corrected - I had understood that you could add &uA as a constant value but I was wrong - so const Endofline = &uA does in fact work - but it is then only local to that method so not that convenient or efficient. Whereas Dave S’s function creation (using either version) would seem a lot more convenient.
Here is something that Norman (or someone else) may be able to confirm or deny…
Does “Xojo for iOS” recognize standard Unix escape sequences?
\
\\r \\t
etc? This is the method that is reccomended for use in other iOS developement environments,
Does making it a global constant not work?
Edit: Confirmed it doesn’t
The best way to obtain the same result as a constant is to create a computer property without setter that returns &u0A.
Easy to add to a module.
You cannot make a constant in the IDE for non printing characters. There was a long discussion about the very issue of EndOfLIne in the beta forum about that in iOS, back in 2014 (I’m not getting any younger).