Two quick questions:

Devin Asay devinasay at gmail.com
Wed Aug 20 05:33:57 EDT 2014


On Aug 20, 2014, at 2:51 AM, Devin Asay <devinasay at gmail.com> wrote:

> 
> On Aug 19, 2014, at 11:47 PM, Paul D. DeRocco <pderocco at ix.netcom.com> wrote:
> 
>> 1) What's the simplest way to test if running under the LC IDE versus as a
>> standalone?
>> 
>> 2) For a Mac standalone, how do I get the full path of the .app file,
>> which is actually a directory? I'm trying to get the standalone to find a
>> custom external .bundle which is actually contained inside the .app file.
> 
> Paul,
> 
> Re #2:
> 
> In a Mac standalone the defaultFolder property will return the path to the .app file. If you want the path to the executable inside the bundle, use the filename of the stack and chop off the last item. I often include a function like this:
> 
> function parentFolder
> get the filename of this stack 
> set the item delimiter to slash
> return item 1 to -1 of it
> end parentFolder

Of course that should be

return item 1 to -2 of it





More information about the use-livecode mailing list