Exporting text from LiveCode in iOS

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

mismel8
Posts: 11
Joined: Tue May 26, 2020 2:18 am

Re: Exporting text from LiveCode in iOS

Post by mismel8 » Fri May 29, 2020 3:51 pm

kdjanz wrote:
Fri May 29, 2020 3:24 am
If you set up a Dropbox for the project with a unique email and login, you could then have your LiveCode app save a text file of results (with a unique name on each device so that you don't get duplicates) and then use the code to upload that text file to Dropbox for analysis later.
This is an interesting idea! So would I be able to upload a file that Livecode created to Dropbox through the web interface (so students don't have to also install the Dropbox app)?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Exporting text from LiveCode in iOS

Post by Mikey » Fri May 29, 2020 4:05 pm

no. you would use the dropbox api that is in livecode to automagically create the file and upload it all within your app. there is no need for the dropbox app.
also you don't need to create different logins, even though you can). you would create an app id for your app, and then you could have a single username/password, and have all the users hitting the same account.
i know you want the publication to be anonymous. there are several ways to do that, including using the time (the seconds) when the user is sending the file appended to the file, generate a random number, etc.

mismel8
Posts: 11
Joined: Tue May 26, 2020 2:18 am

Re: Exporting text from LiveCode in iOS

Post by mismel8 » Fri May 29, 2020 4:48 pm

That sounds great. I have searched through the forums trying to find some basic instructions for writing files from Livecode to Dropbox but I haven't been successful. Anyone know where to find the basics or a lesson? Or if there is a sample stack somewhere?

Mikey
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 755
Joined: Fri Jun 27, 2008 9:00 pm

Re: Exporting text from LiveCode in iOS

Post by Mikey » Sat May 30, 2020 6:43 pm

Long story:
The LC dropbox library is a later version of Gerard McCarthy's Dropbox library. Monte at LC took Gerard's library, made it asynchronous (if you have one of the paid versions of LC), added comments so it would feed the LC docs, and renamed commands and functions.
So even though the command/function names will be a little different, the underlying code is the same.
The repo is here: https://github.com/macMikey/dropboxapi_v2
The test stack is called DropboxAPI_2.livecode

If for whatever reason you can't find LC's implementation (it's in the LC bundle) and need it, it's here:
https://github.com/macMikey/LCDropboxLibrary

rcmills
Posts: 42
Joined: Wed Nov 21, 2018 8:27 pm

Re: Exporting text from LiveCode in iOS

Post by rcmills » Tue Jul 06, 2021 3:23 pm

It's frustrating that the clipboard is not supported in iOS :?
Any idea why? Is implementation ever planned by LC?

kdjanz
Posts: 300
Joined: Fri Dec 09, 2011 12:12 pm
Location: Fort Saskatchewan, AB Canada

Re: Exporting text from LiveCode in iOS

Post by kdjanz » Tue Jul 06, 2021 11:12 pm

To use the clipboard you have to use a native field - then you get the pop over options for cut and paste etc via iOS itself. LiveCode alone cannot access those, but using a native field gets access through the operating system.

You should really start a new topic instead of resurrecting an old thread.

Post Reply

Return to “iOS Deployment”