Externally reffed-off

Mike Bonner bonnmike at gmail.com
Wed Jan 10 06:17:02 EST 2018


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.

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
>>
>> nothing particularly odd there.
>>
>> each image has "rez/imagename.png"
>>  set as its source.
>>
>> AND everything works in the stack.
>>
>> So would be extremely grateful why, when a Mac standalone is placed in
>> exactly
>> the same relation to the "rez" folder it does not "pick up" the images.
>>
>> Richmond.
>>
>> _______________________________________________
>> 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