Externally reffed-off

Klaus major-k klaus at major-k.de
Wed Jan 10 06:32:42 EST 2018



> Am 10.01.2018 um 12:17 schrieb Mike Bonner via use-livecode <use-livecode at lists.runrev.com>:
> 
> Change it to..
> set the defaultfolder to item 1 to -5 of the effective filename of this
> stack
> 
> and it should work. I don't have an available mac to test though, so
> tweakage might be necessary. (not likely though its pretty
> straightforward)
> 
> You can put it in an if block if you want so that if the environment is
> development you use the first method, else you use the second.

Know your Livecode! :-)
...
set the defaultfolder to specialfolderpath("resources")
...

This should however not be neccessary since relative pathnames that work in 
the IDE should also work in a standalone and actually do!

> On Wed, Jan 10, 2018 at 4:05 AM, Mike Bonner <bonnmike at gmail.com> wrote:
> 
>> Its because of this...
>> 
>> *Cross-platform note:* On OS X systems, standalone applications are
>> stored as application bundles. A bundle behaves like a file but is
>> actually a folder, and the main stack of a standalone application is
>> inside this folder. The filename of stack property reports the location
>> of the application inside the bundle, not the bundle'slocation. For
>> example, if the bundle's file path is "/Volumes/Disk/MyApp.app/", the
>> filename of the application's main stack might be
>> "/Volumes/Disk/MyApp.app/Contents/MacOS/MyApp".
>> 
>> On Wed, Jan 10, 2018 at 3:54 AM, Richmond Mathewson via use-livecode <
>> use-livecode at lists.runrev.com> wrote:
>> 
>>> I am currently working on something that calls a lot of external images
>>> which are stored
>>> in a folder called "rez" in the same location as my stack, and when my
>>> stack opens it
>>> works its way through the script:
>>> 
>>> onpreOpenStack
>>>    setitemDelto"/"
>>>    setthedefaultFoldertoitem 1 to-2 of(theeffectivefileNameofthis stack)
>>>    gotocard "TITLE"
>>> endpreOpenStack

Best

Klaus

--
Klaus Major
http://www.major-k.de
klaus at major-k.de





More information about the use-livecode mailing list