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?
Line breaks and multiline
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 10044
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: Line breaks and multiline
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.
You might find getting the clipboardData["text"] and then checking charToNum on the line endings helpful.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
-
- Posts: 379
- Joined: Thu Dec 08, 2011 2:43 am
Re: Line breaks and multiline
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.
I will take a look at the ideas you mention, thanks.
-
- Posts: 379
- Joined: Thu Dec 08, 2011 2:43 am
Re: Line breaks and multiline
I loaded the app onto my iPad and it works just fine... I guess it's a simulator glitch.