newTextBox not wrapping?

I have an app that reads data from an sqlite file. Formerly, it wrapped the lines inside of a newTextBox I have created. For some reason, between earlier today and now, the textbox no longer wraps, but instead simply puts all the text on one long line and the textBox now scrolls horizontally (something I don’t want in this case). I checked to see if the updated build did this somehow, but even a build that I downloaded from the middle of December (same as the public release build), but I got the same thing. Given that it was working fine earlier today, I’m at a lost as to what might be causing this suddent switch. Any ideas? (BTW, here’s the code)
[lua] --content–
for row in db:nrows(sql) do
c = row.content
end

local scriptureText = native.newTextBox(0, 0, display.contentWidth*.8, display.contentHeight-107)
scriptureText:setReferencePoint(display.TopLeftReferencePoint)
scriptureText.x = 36; scriptureText.y = 52
scriptureText.font = native.newFont(“Times New Roman”,18)
scriptureText.text = c
scriptureText.hasBackground = false[/lua] [import]uid: 19999 topic_id: 20314 reply_id: 320314[/import]

Can you step back in your code to try and isolate the problem down further?

If it was working earlier it may be a matter of doing it again, step by step, to find where the culprit lies - then if it is a Corona bug, filing a report with the code to reproduce.

Peach :slight_smile: [import]uid: 52491 topic_id: 20314 reply_id: 79373[/import]

Peach,
As always, thanks for your quick reply. I’ve tested it further and on the simulator, the text always appears on a single line. Because it’s a native element, though, the simulator doesn’t show it the way it appears on the device (doh! I should’ve known that). When I build it to the device, it wraps just fine. [import]uid: 19999 topic_id: 20314 reply_id: 80942[/import]

Hey,

Not a problem - I’m sorry to hear the simulator is displaying differently to the device, though. I suppose it can be a bit tricky to get some of the native stuff working perfectly although I’m sure this is something we’re looking at; I’m going to bring it up in our next meeting just in case :slight_smile:

Peach [import]uid: 52491 topic_id: 20314 reply_id: 80990[/import]

OK, so some more weirdness; the reason I expected the text to wrap in the simulator is because the first time I used native.newTextBox, it did wrap in the simulator. Yesterday, after I built it to an .apk, the simulator started wrapping the text again. This only happens in the simulator after I complete a build. [import]uid: 19999 topic_id: 20314 reply_id: 81058[/import]

That’s really odd, would you mind filing a bug report providing as many details as possible about your setup and steps to reproduce using the link in the top right of the page, please?

It sounds like something we should be looking into.

Peach :slight_smile: [import]uid: 52491 topic_id: 20314 reply_id: 81071[/import]