How to open a file?

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

How to open a file?

Post by liveCode »

How can I write a code developed from a phone?
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: How to open a file?

Post by richmond62 »

If you cannot write questions that are more explanatory it is very difficult to understand them.

Also, a standalone on a phone should NOT be able to open a LiveCode stack that is NOT a substack
of the standalone on the phone.
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

I want there to be a button that opens a particular file on the phone
jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2734
Joined: Sat Dec 22, 2007 5:35 pm
Contact:

Re: How to open a file?

Post by jmburnod »

I want there to be a button that opens a particular file on the phone
you can open files in documents folder only.
Jean-Marc
https://alternatic.ch
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: How to open a file?

Post by dunbarx »

Hi.

Is that what Jean-Marc posted that you were uncertain about?

Or was it how to open a file in general, that is, using the "go" ("open") command?

Craig
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

I want to open a file on my phone
And how do I open a document file?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to open a file?

Post by Klaus »

Hi livecode,
liveCode wrote: Tue Oct 19, 2021 4:08 pmI want to open a file on my phone.
yes, we already guessed from the thread title.
But you did not mention PHONE yet!

EDIT: Sorry, you did!

We cannot access any other file on a mobile device that we did not bring ourselfes as part of our standalone (APK/AAP).
This is for security reasons and is called "Sandboxing".

The "documents" folder -> specialfolderpath("documents") on a mobile device is a little part of our APK
(Application Package for iOS or Android), and there (and ONLY there) we have read and write permission.
That is very different than the "Documents" folder on Mac/Win/Linux!
liveCode wrote: Tue Oct 19, 2021 4:08 pmAnd how do I open a document file?
Please allow me to ask you a question:
Do you really understand enough english to understand what we are trying to tell you here and in other threads?
It does not sound nor look like!


Best

Klaus
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10501
Joined: Wed May 06, 2009 2:28 pm

Re: How to open a file?

Post by dunbarx »

Klaus.

He did mention "phone" in the first post.

I agree we are not communicating well, due to language. I will try...

@ LiveCode. Using LiveCode, do you want to make a mobil app that opens a different file that already exists on your phone?

Craig
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

Yes that's what I want to do
And I do not really know English
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

If I put a file inside the app, how can I edit it?
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to open a file?

Post by Klaus »

What kind of file do you want to edit?
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

I want to edit a txt file
Klaus
Posts: 14324
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: How to open a file?

Post by Klaus »

OK, that is surely possible. :-)

But then you may not need an external TXT file.
Just put the text into a field in LC , then you can edit it inside of your app
and output the modified text to a text file if neccessary.
richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10415
Joined: Fri Feb 19, 2010 10:17 am

Re: How to open a file?

Post by richmond62 »

You can import and export TXT files with LiveCode on a desktop computer
so I see no real reason why this should not be possible to an SD card in
a phone.
liveCode
Posts: 124
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode »

So what is the code I need to write?
Post Reply