Please Verify: display.newText() multi-line text capable?

PS - I advertise Corona to all my dev friends, too :wink: [import]uid: 52491 topic_id: 18996 reply_id: 86804[/import]

Hm, it is indeed as they say, for very short strings I can use special characters.

Just wonder what the relation is though, replaced an entire line of text for a single “á” and a text that was showing without the special characters now returns nothing ( or an empty / invisible field)
I will run some more tests, could be something related to the fact that I was coding under windows and sending the files to my vmwared lion to build. Something might be screwing with the encoding system on that portion too.

[import]uid: 125498 topic_id: 18996 reply_id: 86856[/import]

Any extra info you can provide would be helpful; if there are odd issues and we can isolate them we can then get to work on fixing them :slight_smile:

Peach [import]uid: 52491 topic_id: 18996 reply_id: 86972[/import]

Okay, I managed to isolate the case now…turns out it was the “dumbest” thing that could possibly happen. lol.
As I said above, I’m running OS X Lion under windows 7, via vmware. I set up a shared folder for my VMware machine and was coding using Scite, on windows, and saving the main.lua file directly to the shared folder.

Then went to the vmware machine running lion, opened the shared folder and copied it to another folder under mac os, just for organization.

Opened Corona and built the file straight away, sent to my iPhone to test.

On this last test I’ve ran, I’ve set up multiple single lined text fields, some with special characters, some without. the ones without it showed up just fine, the ones containing special did not.

But then, I’ve opened the main.lua file under my virtualized lion machine using text wrangler and noticed the following:

Texto4 = display.newText("Endurance / ResistÍncia : ", 10, 260)
Texto5 = display.newText("VO2 M·ximo : ", 10, 280)
Texto6 = display.newText("EsforÁo M·ximo / Limite : ", 10, 300)

Where it should read “Resistência, Máximo and Esforço Máximo” , and not those Í and strange dots.

Turns out that when sending the files over to my vmware shared folder, the encoding was getting scrambled and sent to the final build as well.

I’ve edited those with the proper special characters and built and ran on my iPhone, everything working fine now.
I’m sorry for all the misleads on this, but I was very puzzled as well. Hopefully this info will help out other developers that end up using virtualized OS X as well

(it all began as when running corona under virtualized OS X I can’t see the output window for some items, as the Open GL drivers are no good for vmware at the moment, but as apple states, we still need to build it under their systems…)

long story short - whenever using special characters, be sure to check your code under OS X as well before building.

Also make sure that whenever your editor on windows is, you are working under the correct encoding. Scite was working with code page property, which was the culprit.
(I had to either save it to a new file or on text wragler go to save as and change a new encoding system. UTF-8 worked fine for this app.)
[import]uid: 125498 topic_id: 18996 reply_id: 87696[/import]

Thanks very much for the thorough update on this, am very pleased to hear it has been resolved. (Well done on figuring out the cause!)

:slight_smile: [import]uid: 52491 topic_id: 18996 reply_id: 87781[/import]

newText() and newEmbossedText() are now multiline-capable and wrap text fine. However, all setReferencePoint variants display Left justified text only.

I’m able to solve this for the moment with custom code for two-line titles only. But I’d like to know which of the ‘fixes’ posted here and elsewhere is considered a good solution with correct proportional spacing line wrapping.

If it’s fixed in Corona 2013.1076, just point me to documentation and put me out of my ignorance. Thanks!

newText() and newEmbossedText() are now multiline-capable and wrap text fine. However, all setReferencePoint variants display Left justified text only.

I’m able to solve this for the moment with custom code for two-line titles only. But I’d like to know which of the ‘fixes’ posted here and elsewhere is considered a good solution with correct proportional spacing line wrapping.

If it’s fixed in Corona 2013.1076, just point me to documentation and put me out of my ignorance. Thanks!