Re: AppleScriptObjC & Cocoa
Re: AppleScriptObjC & Cocoa
- Subject: Re: AppleScriptObjC & Cocoa
- From: Shane Stanley via AppleScript-Users <email@hidden>
- Date: Mon, 22 Jun 2020 12:59:43 +1000
On 22 Jun 2020, at 11:37 am, Kellen Ruyle via AppleScript-Users
<email@hidden> wrote:
>
> So can you create AppleScript apps with GUI?
Yes. In Xcode you start a new project of type "AppleScript App", then use
AppleScriptObjC to write the code.
> And is it beneficial to learn the Cocoa framework, Objective-C, and thus
> AppleScriptObjC if I ever want to write more advanced scripts, especially
> with GUI’s?
It depends a bit on how much effort you wish to expend, and your ultimate aim.
Yes, you can write complex AppleScriptObjC-based apps. However, there are some
potential shortcomings. In particular, AppleScriptObjC memory management is
pretty awful. The upshot is that for apps where you want to show an initial
interface and perhaps display progress, it works fine. But if you want a more
fully fledged app that you keep running all the time, or one that is very
complex, there's a reasonable chance you'll eventually run into memory
problems. There are also other limitations that may or may not matter to you
(providing proper undo support is problematic, for example).
> If so, are there any resources out there?
There's not much specific the using AppleScript in Xcode-based apps. You can
probably find an old Apple example, plus it was covered in a WWDC video when it
was introduced. There's also a movie around that covers making interface
connections, linked to here:
<http://www.macosxautomation.com/applescript/apps/>. But there's nothing recent.
I wrote a book on it ('AppleScriptObjC Explored'), but I no longer sell it
except by request, because it hasn't been updated for several versions of
Xcode/macOS. Xcode changes regularly, and there simply wan't the demand to
justify further updates.
--
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