Page 1 of 1
Line breaks and multiline
Posted: Sat Oct 24, 2015 8:00 pm
by teacherguy
I've stumbled on an interesting issue. I have a multiline control that, upon the end of editing, deposits the text into a card field. Well, if the user types manually and uses the return key to make a column of data, everything works fine. But if the user pastes a column of text, the line breaks are not recognized and one long string is deposited into the field after editing is done.
Any ideas (a) why this is the case and (b) how to counteract?
Re: Line breaks and multiline
Posted: Sat Oct 24, 2015 8:21 pm
by FourthWorld
What platform? And from what program was the data copied?
You might find getting the clipboardData["text"] and then checking charToNum on the line endings helpful.
Re: Line breaks and multiline
Posted: Sat Oct 24, 2015 9:26 pm
by teacherguy
Thanks Richard. I tried copying a column of text from iMessage and pasting into my app...in the simulator. Visually it pastes in just fine but after editing closes it deposits into the field as a string.
I will take a look at the ideas you mention, thanks.
Re: Line breaks and multiline
Posted: Sat Oct 24, 2015 9:58 pm
by teacherguy
I loaded the app onto my iPad and it works just fine... I guess it's a simulator glitch.