Re: PrefsStorageLib 1.0.0 and El Capitan
Re: PrefsStorageLib 1.0.0 and El Capitan
- Subject: Re: PrefsStorageLib 1.0.0 and El Capitan
- From: Shane Stanley <email@hidden>
- Date: Sun, 28 Apr 2019 12:35:22 +1000
On 28 Apr 2019, at 12:19 pm, Laine Lee <email@hidden> wrote:
>
> Sure, and it’s pretty close to an example given in the PrefsStorageLib ReadMe
> file, except the value is text. Again, this problem doesn’t exist in Mojave.
> I’ve yet to try it in Sierra and High Sierra. Also, the only El Capitan
> system I’ve tried is a 10-year old MacBook Pro that can’t run anything more
> recent than El Capitan, but everything else seems to work well.
I don't have an El Capitan system to test with here, but I can see one
possibility. If you open PrefsStorageLib.scptd, you will see this line early on:
if current application's NSRunningApplication's currentApplication()'s
bundleURL()'s isEqual:bundleURL then -- must be running as applet
That should return true when running as an applet, and false when running in an
editor. However, I recall an issue at one stage with boolean results from
ASObjC not being properly converted to AppleScript booleans in some
circumstances, so effectively the result can never be true. So edit the above
line to read like this:
if (current application's NSRunningApplication's currentApplication()'s
bundleURL()'s isEqual:bundleURL) as boolean then -- must be running as applet
Let me know if that solves the problem.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden