I'm working on my first app with RunRev, and my app will be required to read from an existing file that I will include with the app as well as create a file that the the user can modify within the app. The app will be designed for Iphone, Ipad and Android. My question is when I am tell it where to look or create the file what path do I use?
Thank you,
Ty
Specialfilefolder
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Specialfilefolder
Hi Ty,
There are several ways to do this. You can include a file with the engine using the Copy Files tab of the Standalone Application Settings window. You could get the contents of the file with one of the following:
You could also set a custom property to the data of that file. That saves you the trouble of getting around permission problems.
You can save a user document in the documents folder:
Kind regards,
Mark
There are several ways to do this. You can include a file with the engine using the Copy Files tab of the Standalone Application Settings window. You could get the contents of the file with one of the following:
Code: Select all
put url ("file:" & specialfolderpath("engine") & "/filename.txt") into myData
put url ("binfile:" & specialfolderpath("engine") & "/filename.txt") into myData
You can save a user document in the documents folder:
Code: Select all
put myData into url ("binfile:" & specialfolderpath("documents") & "/filename.txt")
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
-
- Posts: 151
- Joined: Sat Aug 25, 2012 1:14 am
Re: Specialfilefolder
Thank you very much.
One followup, when the user saves info to a file do I also use the same concept? the file will hold previous lines of saved items and allows the user to delete specific lines.
Thank you again.
One followup, when the user saves info to a file do I also use the same concept? the file will hold previous lines of saved items and allows the user to delete specific lines.
Thank you again.
Re: Specialfilefolder
Hi,
Yes, sure, it doesn't matter if you're just saving data once or reading, modifying and saving the data.
Best,
Mark
Yes, sure, it doesn't matter if you're just saving data once or reading, modifying and saving the data.
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: Specialfilefolder
Hi guys,
this is everything but OFF-TOPIC (HINT, HINT!), so I will move this thread to the beginners section.
Best
Klaus
this is everything but OFF-TOPIC (HINT, HINT!), so I will move this thread to the beginners section.
Best
Klaus