On Aug 19, 2014, at 11:47 PM, Paul D. DeRocco <pdero...@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

That works in the traditional Mac OS X environment; once we have to start using 
sandboxed apps we may be able to get that info using 
specialFolderPath(“engine”), as you can now on iOS.

HTH

Devin

Devin Asay
Learn to code with LiveCode University
http://university.livecode.com


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

Reply via email to