Locating and loading a CSV file

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Newbie4
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 332
Joined: Sun Apr 15, 2012 1:17 am
Contact:

Locating and loading a CSV file

Post by Newbie4 » Wed Jul 11, 2012 2:08 am

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
Cyril Pruszko
https://sites.google.com/a/pgcps.org/livecode/
https://sites.google.com/a/setonhs.org/app-and-game-workshop/home
https://learntolivecode.com/

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Locating and loading a CSV file

Post by BvG » Thu Jul 12, 2012 3:08 pm

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
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Adrian
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 79
Joined: Wed Jul 11, 2012 5:03 pm

Re: Locating and loading a CSV file

Post by Adrian » Thu Jul 12, 2012 6:09 pm

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

Post Reply