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: 119
Joined: Sun Oct 17, 2021 5:53 pm

How to open a file?

Post by liveCode » Mon Oct 18, 2021 4:58 pm

How can I write a code developed from a phone?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to open a file?

Post by richmond62 » Mon Oct 18, 2021 6:05 pm

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode » Mon Oct 18, 2021 7:58 pm

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: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: How to open a file?

Post by jmburnod » Mon Oct 18, 2021 10:01 pm

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: 9662
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: How to open a file?

Post by dunbarx » Tue Oct 19, 2021 1:08 am

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode » Tue Oct 19, 2021 4:08 pm

I want to open a file on my phone
And how do I open a document file?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to open a file?

Post by Klaus » Tue Oct 19, 2021 4:41 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9662
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: How to open a file?

Post by dunbarx » Tue Oct 19, 2021 5:03 pm

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode » Wed Oct 20, 2021 4:45 pm

Yes that's what I want to do
And I do not really know English

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

Re: How to open a file?

Post by liveCode » Wed Oct 20, 2021 6:47 pm

If I put a file inside the app, how can I edit it?

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to open a file?

Post by Klaus » Thu Oct 21, 2021 12:29 pm

What kind of file do you want to edit?

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

Re: How to open a file?

Post by liveCode » Thu Oct 21, 2021 4:35 pm

I want to edit a txt file

Klaus
Posts: 13829
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: How to open a file?

Post by Klaus » Thu Oct 21, 2021 4:51 pm

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: 9385
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: How to open a file?

Post by richmond62 » Thu Oct 21, 2021 4:55 pm

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: 119
Joined: Sun Oct 17, 2021 5:53 pm

Re: How to open a file?

Post by liveCode » Thu Oct 21, 2021 6:13 pm

So what is the code I need to write?

Post Reply

Return to “Getting Started with LiveCode - Experienced Developers”