Access Resource Files
JB
sundown at pacifier.com
Fri Sep 20 13:50:31 EDT 2019
Thanks Klaus,
I will give it a try and then get back with
the details.
JB
> On Sep 20, 2019, at 10:45 AM, Klaus major-k via use-livecode <use-livecode at lists.runrev.com> wrote:
>
> Hi JB,
>
>> Am 20.09.2019 um 19:31 schrieb JB via use-livecode <use-livecode at lists.runrev.com>:
>>
>> Thank you for the info.
>>
>> I am using a earlier version and specialfolderpath("resources”) is not
>> available
>
> ah, yes, I saw that specialfolderpath() codes have been introduced in LC 1.1
> but did no know that the RESOURCES folder came later.
>
>> but specialfolderpath(“desktop”) and others are available.
>> I don’t think it is possible without specific code written by those who
>> made the app bundle. Things like NSBundle etc seem to be built
>> for use by the app developer and the links don’t work for others
>> who are not accessing it at that level.
>
> I think in older versions of LC the files got copied in to the same folder as the runtime,
> so if -> specialfolderpath("engines") is already supported by your version of LC you
> could try that one:
> ...
> put specialfolderpath("desktop") & "/mypic.jpg" into tTargetFile
> put specialfolderpath("engine") & "/mypic.jpg" into tSourceFile
> if there is not a file tTargetfile then
> put url("binfile:" & tSourceFile) into url("binfile:" & tTargetFile)
> end if
> ...
>
> If not supported, the you need to do it manually:
> ...
> put specialfolderpath("desktop") & "/mypic.jpg" into tTargetFile
>
> ## This is the runtime:
> put the effective filename of this stack into tSourceFile
> set itemdel to "/"
> put "mypic.jpg" into item -1 of tSourceFile
> if there is not a file tTargetfile then
> put url("binfile:" & tSourceFile) into url("binfile:" & tTargetFile)
> end if
> ...
>
> You get the picture...
>
>> thanks again,
>> JB
>>
>>> On Sep 20, 2019, at 10:10 AM, Niggemann, Bernd via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> answer specialfolderpath("resources")
>>> ..
>>> in the standalone and check if that is the folder you manually copied the file(s) to!
>>> specialfolderpath("resources") was introduced in LC 6.7.5 (from the dictionary)
>
> Which explains your empty dialog! :-)
>
>
> Best
>
> Klaus
> --
> Klaus Major
> https://www.major-k.de
> klaus at major-k.de
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list