AW: open stack finds stack in wrong path!?
Tiemo Hollmann TB
toolbook at kestner.de
Wed Jun 17 09:55:35 EDT 2015
Devin, you were absolutely right,
I was using the wrong itemDel :(
Thank you for coaching
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag
von Devin Asay
Gesendet: Montag, 15. Juni 2015 19:57
An: How to use LiveCode
Betreff: Re: open stack finds stack in wrong path!?
On Jun 15, 2015, at 10:37 AM, Tiemo Hollmann TB <toolbook at kestner.de> wrote:
> LC 6.5.2, OS X 10.9. I have a splash stack and a main stack. The
> mainStack is located at the regular place on the same level as the
> executable within the app bundle.
> Because this software runs directly from CD and there also is a
> windows version on the CD, there is a copy of the mainStack on the
> same level, as the app bundle in the root of the CD, which is used from
the windows exe.
> On OS X I open the main stack with: open stack (item 1 to -2 of the
> effective filename of this stack & slash & "mainStack.rev"). The
> splash stack opens correctly the mainStack in its bundle, only as far
> there is no copy of the mainStack on bundle level. But as soon there
> is a copy of the mainStack in the bundle directory (for windows use),
> the OS X program ignores my given path within the bundle and opens the
> mainStack from the bundle level, which I don't want to be used on OS X.
> Is there any secret hierarchy for looking for stackfiles and ignoring
> given paths? Or am I overseeing something obviously?
On OS X looking for a stackfile relative to the location of the .app bundle
will look inside the .app bundle, as you have seen. But if you dont try to
find a stackfile relative to the .app, it will look first in the folder that
contains the .app bundle. I think you can work around your problem by
including this in the preOpenStack or openStack handler of the splash
if the environment is development then
go stack item 1 to -2 of the effective filename of this stack & slash &
go stack mainStack.rev
Why? Because once the stack is made into a standalone the defaultFolder
becomes the folder containing the .app bundle. It should therefore work in
both the Mac and Windows environments.
I hope I understood your problem correctly.
Office of Digital Humanities
Brigham Young University
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
More information about the Use-livecode