Where does LiveCode/Windows store specialFolderPath("Resources") data?

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

Where does LiveCode/Windows store specialFolderPath("Resources") data?

Stephen MacLean via use-livecode
I'm building a cross-platform app for Mac and Windows. I store a data file
that is update by the user in specialFolderPath("Resources"). On the Mac, I
know where this is and can even view it, using the Show Package command
from the Finder.

One thing that is clear with the Mac is that this data file is encapsulated
with the app itself. If I run a separate instance of the app, the data file
is completely separate and not influenced by the data file of the first app.

This doesn't seem to be the case with Windows. I've built 3 separate
standalones in Windows and have found, to my surprise, that if I change the
data file in one of the standalones, it is reflected in the datafile of the
others.

Somehow it seems like the data file is stored externally from the app and
that all versions have access to it (whether that is my intent or not).

I've build special versions for each platform with the command
"Put specialFolderPath("Resources") into fld "somefield" in the openstack
handler. On the Mac it gives me the full path to the application along with
"/Contents/Resources/_MacOS/". On the Windows version, the field is blank.

So where does LC store files using specialFolderPath("Resources") under
Windows? And why are they available to any app using
specialFolderPath("Resources")?

--
Regards,

Howard Bornstein
-----------------------
www.designeq.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: Where does LiveCode/Windows store specialFolderPath("Resources") data?

Stephen MacLean via use-livecode
It should report the parent folder of the executable. I just built a test and it works as expected per the dictionary entry for specialFolderPath.

Thanks,
Brian
On Oct 2, 2018, 3:20 PM -0400, Howard Bornstein via use-livecode <[hidden email]>, wrote:

> I'm building a cross-platform app for Mac and Windows. I store a data file
> that is update by the user in specialFolderPath("Resources"). On the Mac, I
> know where this is and can even view it, using the Show Package command
> from the Finder.
>
> One thing that is clear with the Mac is that this data file is encapsulated
> with the app itself. If I run a separate instance of the app, the data file
> is completely separate and not influenced by the data file of the first app.
>
> This doesn't seem to be the case with Windows. I've built 3 separate
> standalones in Windows and have found, to my surprise, that if I change the
> data file in one of the standalones, it is reflected in the datafile of the
> others.
>
> Somehow it seems like the data file is stored externally from the app and
> that all versions have access to it (whether that is my intent or not).
>
> I've build special versions for each platform with the command
> "Put specialFolderPath("Resources") into fld "somefield" in the openstack
> handler. On the Mac it gives me the full path to the application along with
> "/Contents/Resources/_MacOS/". On the Windows version, the field is blank.
>
> So where does LC store files using specialFolderPath("Resources") under
> Windows? And why are they available to any app using
> specialFolderPath("Resources")?
>
> --
> Regards,
>
> Howard Bornstein
> -----------------------
> www.designeq.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: Where does LiveCode/Windows store specialFolderPath("Resources") data?

Stephen MacLean via use-livecode
That's the result I get when I'm running in the LC environment. That didn't
happen with a standalone. The dictionary describes where these files go: "In
a standalone, the resources folder where files or folders specified in the
Standalone Builder are located."  It says your resources go in "the
resources folder" where any files you've specified are located.

This appears to be referring to the Copy Files tab of the Standalone
Builder. Since my data file is created in the app, I don't have anything to
put in the Copy Files tab. If this tab is empty, what is the default
location? Is there some other place in the Standalone builder where you can
point to files or folders?

On the Mac, this definition is verifiable, since my data file *is* in the
Resources folder (although a couple levels down) within the application
bundle. Under Windows, is there actually a folder somewhere called
Resources? Where is it?


On Tue, Oct 2, 2018 at 12:59 PM Brian Milby via use-livecode <
[hidden email]> wrote:

> It should report the parent folder of the executable. I just built a test
> and it works as expected per the dictionary entry for specialFolderPath.
>
> Thanks,
> Brian
> On Oct 2, 2018, 3:20 PM -0400, Howard Bornstein via use-livecode <
> [hidden email]>, wrote:
> > I'm building a cross-platform app for Mac and Windows. I store a data
> file
> > that is update by the user in specialFolderPath("Resources"). On the
> Mac, I
> > know where this is and can even view it, using the Show Package command
> > from the Finder.
> >
> > One thing that is clear with the Mac is that this data file is
> encapsulated
> > with the app itself. If I run a separate instance of the app, the data
> file
> > is completely separate and not influenced by the data file of the first
> app.
> >
> > This doesn't seem to be the case with Windows. I've built 3 separate
> > standalones in Windows and have found, to my surprise, that if I change
> the
> > data file in one of the standalones, it is reflected in the datafile of
> the
> > others.
> >
> > Somehow it seems like the data file is stored externally from the app and
> > that all versions have access to it (whether that is my intent or not).
> >
> > I've build special versions for each platform with the command
> > "Put specialFolderPath("Resources") into fld "somefield" in the openstack
> > handler. On the Mac it gives me the full path to the application along
> with
> > "/Contents/Resources/_MacOS/". On the Windows version, the field is
> blank.
> >
> > So where does LC store files using specialFolderPath("Resources") under
> > Windows? And why are they available to any app using
> > specialFolderPath("Resources")?
> >
> > --
> > Regards,
> >
> > Howard Bornstein
> > -----------------------
> > www.designeq.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
>


--
Regards,

Howard Bornstein
-----------------------
www.designeq.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: Where does LiveCode/Windows store specialFolderPath("Resources") data?

Stephen MacLean via use-livecode
In reply to this post by Stephen MacLean via use-livecode
Tried in Win 10-64 pro (v1803), both with LC 9.0.1 and 6.7.10, both in IDE
and StandAlone.

   SpecialFolderPath("resources")
_is_always_
   item 1 to -2 of the effective filename of this stack
(assuming slash as itemdel).

> I store a data file that is update by
> the user in specialFolderPath("Resources")
You may assume _not_ to have write permissions in the program folder (in
modern OSses).
For user data there is the SFPs "documents" and "temporary".

Have fun, axwald
(@ forums.livecode.com)









-----
• Livecode programming until the cat hits the fan •
--
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