Sample text is in the format of multi-lined comma-separated values:
Push-ups, Full
Plank, Core
Squats, Legs
I've tried searching for ways to do this, a lot of forum posts seem quite old, so I just want to clarify what I've seen on them is still relevant and what I've tested is correct
My understanding is:
1. There is no copy/paste function from the Livecode fields on iphone, you have to use an iOS Native field (mobileControlCreate etc.)
2. There is no iOS Native field widget (unlike Android) and there's no information about there being one in development
3. I can't create a button that will just access whatever's on the iPhone clipboard and put it into one of my fields
4. I found that on my iPhone I could paste into an Ask/Answer Dialog box and put the "it" into a field, but it got put in as a single line string (all the returns disappeared)
5. I could have .csv file imported from email or another app but that has it's own process http://lessons.livecode.com/m/4069/l/10 ... lc-ios-app
I have looked through http://lessons.livecode.com/m/4069/l/29 ... -on-mobile and http://livecode.byu.edu/mobile/device-specific.php
The difficulty is the whole Native Field process (mobileControlCreate) seems like it may be tricky to learn and get full functionality out of it as an amateur, particularly as I'll probably need the field to be editable and scrollable with multiple lines of text.
And my attempt below doesn't seem to have generated anything on my card.
Any suggestions for a workaround without creating a Native Field?
Otherwise, any feedback on the code below?
Code: Select all
local sControlID
on preOpenCard
if the environment is "mobile" then
mobileControlCreate "multiline", "nameinput"
put the result into sControlID -- save it for later reference
end if
mobileControlSet "nameinput", "visible", true
mobileControlSet "nameinput", "rect", "100,150,400,176"
mobileControlSet "nameinput", "backgroundColor", "0,0,255"
mobileControlSet "nameinput", "opaque", true
mobileControlSet "nameinput", "fontName", "Helvetica"
mobileControlSet "nameinput", "fontSize", 24
mobileControlSet "nameinput", "textColor", "0,0,0"
mobileControlSet "nameinput", "borderStyle", "none"
mobileControlSet "nameinput", "autoCapitalizationType", "sentences"
mobileControlSet "nameinput", "autoCorrectionType", "Yes"
mobileControlSet "nameinput", "autoClear", "true"
mobileControlSet "nameinput", "text", "bonjour"
end preOpenCard
on closeCard
if the environment is "mobile" then
mobileControlDelete "nameinput"
end if
end closeCard