Re: Script Objects
Re: Script Objects
- Subject: Re: Script Objects
- From: Jon Pugh <email@hidden>
- Date: Tue, 19 Jan 2010 10:13:47 -0800
At 12:07 PM -0500 1/19/10, Mark J. Reed wrote:
>My point was not worth this number of messages, so I'm shutting up
>after this, but here it is in a nutshell.
Oh good, I get the last word then. ;)
>To recap: You complained that the largest issue with script objects is
>that there's no easy way to handle lots of them in AS, confusing
>Chris. You then clarified that you meant there's no easy way to
>handle lots of *external* script objects.
The major point of Object Oriented Programming is encapsulation, the ability to isolate data and functionality in an "object". AppleScript supports this concept with script objects. Being difficult to manage is directly related to their functionality and usefulness.
As an example, in C to encapsulate functionality you would create a library of functions. In C++ you instead create a library of objects (although of course, C++ also can still create and use C libraries). Typically these are one object per file and the linker combines them all together. There is no linker in AppleScript and no way to combine multiple script objects together, aside from doing it manually with "load script" or with a third party script editor (which is how I manage it, so this isn't really a problem for me).
I don't think there's a real argument here. It's just a matter of whether you consider the management of numerous script objects to be related to the usefulness of script objects in the first place and whether you consider "load script" to be the kludge I know it is. ;)
As far as more significant issues with AppleScript script objects, I'd certainly be interested in knowing what other people consider to be bigger issues. As far as I'm concerned, script objects work quite well, performing their duty as designed. It's only when you get a bunch of them that you get bogged down.
Jon
PS
Confusing Chris isn't that much of a challenge. We're friends and can easily wander off into the conversational weeds without much effort.
_______________________________________________
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