Page 1 of 2

How to open a file?

Posted: Mon Oct 18, 2021 4:58 pm
by liveCode
How can I write a code developed from a phone?

Re: How to open a file?

Posted: Mon Oct 18, 2021 6:05 pm
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.

Re: How to open a file?

Posted: Mon Oct 18, 2021 7:58 pm
by liveCode
I want there to be a button that opens a particular file on the phone

Re: How to open a file?

Posted: Mon Oct 18, 2021 10:01 pm
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

Re: How to open a file?

Posted: Tue Oct 19, 2021 1:08 am
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

Re: How to open a file?

Posted: Tue Oct 19, 2021 4:08 pm
by liveCode
I want to open a file on my phone
And how do I open a document file?

Re: How to open a file?

Posted: Tue Oct 19, 2021 4:41 pm
by Klaus
Hi livecode,
liveCode wrote:
Tue Oct 19, 2021 4:08 pm
I 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 pm
And 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

Re: How to open a file?

Posted: Tue Oct 19, 2021 5:03 pm
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

Re: How to open a file?

Posted: Wed Oct 20, 2021 4:45 pm
by liveCode
Yes that's what I want to do
And I do not really know English

Re: How to open a file?

Posted: Wed Oct 20, 2021 6:47 pm
by liveCode
If I put a file inside the app, how can I edit it?

Re: How to open a file?

Posted: Thu Oct 21, 2021 12:29 pm
by Klaus
What kind of file do you want to edit?

Re: How to open a file?

Posted: Thu Oct 21, 2021 4:35 pm
by liveCode
I want to edit a txt file

Re: How to open a file?

Posted: Thu Oct 21, 2021 4:51 pm
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.

Re: How to open a file?

Posted: Thu Oct 21, 2021 4:55 pm
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.

Re: How to open a file?

Posted: Thu Oct 21, 2021 6:13 pm
by liveCode
So what is the code I need to write?