Page 1 of 1
Collecting Data From Edit Field
Posted: Mon Aug 24, 2015 12:45 pm
by Googie85
Hello Guys!!
I have a newb question and usually try and find things out for myself, but, im having difficulties with this one...
I need to put the value of an edit field (Android) into a variable. here is my code...
on openStack
mobileControlCreate "input", "emailtext"
mobileControlSet "emailtext", "visible", true
mobileControlSet "emailtext", "rect", "220,350,550,400"
end openStack
How do I get the data into a variable? I have tried "put the field "emailtext" into example" nothing works...
Many Thanks,
Matthew.
Re: Collecting Data From Edit Field
Posted: Mon Aug 24, 2015 1:16 pm
by Klaus
Hi Matthew,
always check the "See also" entries in the dictionary!
The opposite of "mobilecontrolSet" = "mobilecontrolGet", so you can do this:
...
put mobilecontrolget("emailtext","text") into tEmailText
...
Check the dictionary for a lot more options of "mobilecontrolget"!
Best
Klaus
Re: Collecting Data From Edit Field
Posted: Mon Aug 24, 2015 2:21 pm
by Googie85
Thanks Klaus...
mobileControlSet "keyboardType", "email"
this does not work...
Can you help?
Sorry for pestering!!
Thanks,
Matthew.
Re: Collecting Data From Edit Field
Posted: Mon Aug 24, 2015 2:25 pm
by Klaus
Hi Matthew,
you forgot the reference to the native control!
...
mobileControlSet "emailtext", "keyboardType", "email"
...
Best
Klaus
Re: Collecting Data From Edit Field
Posted: Tue Aug 25, 2015 10:27 am
by Googie85
mobileControlSet "emailtext", "keyboardType", "email" ----- Worked Fine, Thanks!!!!
My external path (Android) /mnt/extSdCard wont let me save to it. I have enabled the standalone application settings to allow me to write to external storage and still no luck...
put "1" into URL "file:/mnt/extSdCard/test.txt"
Not Working... Any Help Would Be Greatly Appreciated...
Many Thanks,
Matthew.
Re: Collecting Data From Edit Field
Posted: Tue Aug 25, 2015 11:04 am
by SparkOut
MaxV is the go to guy for Android file path information.
http://forums.livecode.com/viewtopic.ph ... 15#p127466
This thread will probably be helpful.
Re: Collecting Data From Edit Field
Posted: Fri Aug 28, 2015 11:55 am
by MaxV
Here I am
External SD is a nightmare in any programming language.
There is no standard and Google doesn't want to set a standard.
However most of the device have:
- /mnt/sdcard0
- /mnt/sdcard1
One is virtual to internal memory (every mobilepone have nowdays a interla SDcard soldered to the mohrboard), the other one is the externa SDcard