On Aug 20, 2014, at 2:51 AM, Devin Asay <[email protected]> wrote:

> 
> On Aug 19, 2014, at 11:47 PM, Paul D. DeRocco <[email protected]> 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


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to