Mobile write to text file woes

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Mobile write to text file woes

Stephen MacLean via use-livecode
I have a little app
It works and makes me smile
It reads text data in a snap
But won't write with "Can't open file"

The path is set the same for both
The file is in the bundle
So why can't I write to the file it reads?
Mutter, mumble, grumble, grumble...


Hugh Senior


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
On the pretense of increased security, more and more OSes are
incorporating various levels of Sandboxing. Eventually it seems, you
will only be able to write to the users Documents folder and no where else.

I'd don't know what OS and version you are on, but I am not surprised
you can not write, without admin permissions, to the Program files (Win)
or Applications (OSX) folders.


On 9/22/2018 7:39 AM, FlexibleLearning.com via use-livecode wrote:

> I have a little app
> It works and makes me smile
> It reads text data in a snap
> But won't write with "Can't open file"
>
> The path is set the same for both
> The file is in the bundle
> So why can't I write to the file it reads?
> Mutter, mumble, grumble, grumble...
>
>
> Hugh Senior
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
To be more clear, “engine” and “resources” paths are read only on iOS. When starting an app, you need to copy any resources you need to change to the “documents”, “cache”, “temporary”, or “library” specialFolderPath depending on how you want the file to last.

Thanks,
Brian
On Sep 22, 2018, 6:40 AM -0500, FlexibleLearning.com via use-livecode <[hidden email]>, wrote:

> I have a little app
> It works and makes me smile
> It reads text data in a snap
> But won't write with "Can't open file"
>
> The path is set the same for both
> The file is in the bundle
> So why can't I write to the file it reads?
> Mutter, mumble, grumble, grumble...
>
>
> Hugh Senior
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
Hi Hugh,

Have a look at this lesson
I'm sure it will help
If the location is right
then the file you can write

http://lessons.livecode.com/m/4069/l/14301-how-do-i-read-write-to-files-on-mobile
<http://lessons.livecode.com/m/4069/l/14301-how-do-i-read-write-to-files-on-mobile>  



-----
Andy Piddock


My software never has bugs. It just develops random features.

TinyIDE  a Free alternative minimalist IDE Plugin for LiveCode


Script editor Themer for LC http://2108.co.uk 

PointandSee is a FREE simple but full featured under cursor colour picker / finder.
http://www.pointandsee.co.uk  - made with LiveCode
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
On 9/22/18 6:39 AM, FlexibleLearning.com via use-livecode wrote:
> I have a little app
> It works and makes me smile
> It reads text data in a snap
> But won't write with "Can't open file"
>
> The path is set the same for both
> The file is in the bundle
> So why can't I write to the file it reads?
> Mutter, mumble, grumble, grumble...

You cannot write inside the app,
It's neither smart nor shrewd.
And if you try you'll want to cry
Because, in fact, you're screwed.

It matters much what path you use,
As just a few make sense.
Write to temp or cache or prefs
Or also documents.

I knew a hack who wrote a crack
And saved it to the bundle.
His malware failed; it was assailed
As a very stupid fumble.

So lend an ear, all ye who hear,
Do not proceed apace.
Unless you know where files should go
You'll end up losing face.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
Jacqueline, love the prose, put a smile on my face before bed.



-----
Andy Piddock


My software never has bugs. It just develops random features.

TinyIDE  a Free alternative minimalist IDE Plugin for LiveCode


Script editor Themer for LC http://2108.co.uk 

PointandSee is a FREE simple but full featured under cursor colour picker / finder.
http://www.pointandsee.co.uk  - made with LiveCode
--
Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
sweet!

> On Sep 22, 2018, at 2:10 PM, J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> On 9/22/18 6:39 AM, FlexibleLearning.com via use-livecode wrote:
>> I have a little app
>> It works and makes me smile
>> It reads text data in a snap
>> But won't write with "Can't open file"
>> The path is set the same for both
>> The file is in the bundle
>> So why can't I write to the file it reads?
>> Mutter, mumble, grumble, grumble...
>
> You cannot write inside the app,
> It's neither smart nor shrewd.
> And if you try you'll want to cry
> Because, in fact, you're screwed.
>
> It matters much what path you use,
> As just a few make sense.
> Write to temp or cache or prefs
> Or also documents.
>
> I knew a hack who wrote a crack
> And saved it to the bundle.
> His malware failed; it was assailed
> As a very stupid fumble.
>
> So lend an ear, all ye who hear,
> Do not proceed apace.
> Unless you know where files should go
> You'll end up losing face.
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Mobile write to text file woes

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
That was so good I put it up on facebook. :-)

Bob S


> On Sep 22, 2018, at 14:10 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
>> I have a little app
>> It works and makes me smile
>> It reads text data in a snap
>> But won't write with "Can't open file"
>> The path is set the same for both
>> The file is in the bundle
>> So why can't I write to the file it reads?
>> Mutter, mumble, grumble, grumble...
>
> You cannot write inside the app,
> It's neither smart nor shrewd.
> And if you try you'll want to cry
> Because, in fact, you're screwed.
>
> It matters much what path you use,
> As just a few make sense.
> Write to temp or cache or prefs
> Or also documents.
>
> I knew a hack who wrote a crack
> And saved it to the bundle.
> His malware failed; it was assailed
> As a very stupid fumble.
>
> So lend an ear, all ye who hear,
> Do not proceed apace.
> Unless you know where files should go
> You'll end up losing face.
>
> --
> Jacqueline Landman Gay


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode