Re: AS Library Question
Re: AS Library Question
- Subject: Re: AS Library Question
- From: Chris Page <email@hidden>
- Date: Thu, 17 Dec 2015 07:12:27 -0800
> On Dec 14, 2015, at 4:26 PM, has <email@hidden> wrote:
>
> You'll need to eliminate any mutable state such as preferences they might have by e.g. converting those properties and their related handlers into OO code...
Do you mean that your loader writes modified libraries back to disk? AppleScript specifically does not. This makes it safe for library state to change, because it only affects what's in memory--just like Mach-O frameworks, and libraries in other languages.
What do you mean by “convert properties and handlers into [Object-Oriented] code”? Properties and handlers are hallmarks of object-oriented programming. Did you mean “create handlers for reading and writing state instead of letting clients directly manipulate properties” and “add code to save/restore state in preferences”?
> ...and you'll have to get rid of any sub-modules (which the AS loader doesn't support) and copy-and-paste all of their code into the top-level module.
Please elaborate. Libraries can use other libraries, and library bundles can contain libraries.
--
Chris Page
The other, other AppleScript Chris
_______________________________________________
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