Collecting Data From Edit Field

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

Collecting Data From Edit Field

Post by Googie85 » Mon Aug 24, 2015 12:45 pm

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.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Collecting Data From Edit Field

Post by Klaus » Mon Aug 24, 2015 1:16 pm

Hi Matthew,

always check the "See also" entries in the dictionary! 8)

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

Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

Re: Collecting Data From Edit Field

Post by Googie85 » Mon Aug 24, 2015 2:21 pm

Thanks Klaus...

mobileControlSet "keyboardType", "email"

this does not work...

Can you help?

Sorry for pestering!!

Thanks,

Matthew.

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Collecting Data From Edit Field

Post by Klaus » Mon Aug 24, 2015 2:25 pm

Hi Matthew,

you forgot the reference to the native control!
...
mobileControlSet "emailtext", "keyboardType", "email"
...


Best

Klaus

Googie85
Posts: 227
Joined: Tue Aug 05, 2014 10:07 am

Re: Collecting Data From Edit Field

Post by Googie85 » Tue Aug 25, 2015 10:27 am

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.

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: Collecting Data From Edit Field

Post by SparkOut » Tue Aug 25, 2015 11:04 am

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.

MaxV
Posts: 1580
Joined: Tue May 28, 2013 2:20 pm
Contact:

Re: Collecting Data From Edit Field

Post by MaxV » Fri Aug 28, 2015 11:55 am

Here I am :D
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
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w

Post Reply