Page 1 of 1

Locating and loading a CSV file

Posted: Wed Jul 11, 2012 2:08 am
by Newbie4
I would like to load data from a CSV file provided by the user. I read the LiveCode doc and the release notes for IOS - LiveCode (ASK and ANSWER commands) but I am still not sure how to do this. I guess it breaks down to:

1. How do a load a CSV data file on an iPad? Where do I have the user put it or where is the best place for me to get it from if I have a fixed name?

2. How can I request a file name (and location from the user?)

3. Does the user have to put the file on his iPad beforehand?

Does that make sense?

Thanks

Re: Locating and loading a CSV file

Posted: Thu Jul 12, 2012 3:08 pm
by BvG
I don't think that users can put files onto their iOS devices themselves. As far as I know, the only way to get existing files there is to create them, or download them yourself in your app from a server.

See also this lesson on file handling on iOS: http://lessons.runrev.com/s/lessons/m/4 ... les-in-ios

Re: Locating and loading a CSV file

Posted: Thu Jul 12, 2012 6:09 pm
by Adrian
As you can see, I am pretty much a newbie, but maybe I can offer some pointers. Of course, all of this could be drivel!

You could have the csv file in the "docments" folder and open it from there. If there's multiple fles, you could use something like iphonepick to offer choices.

There's a thread called "Documents and iTunes" in this forum which shows how to transfer files between iTunes and the iPad - maybe that's the right approach for you? Alternayively you could get the csv files via html. I guess it depends on where the files are coming from.

Hope this helps a bit.

Cheers,

Adrian