Re: Attachability
Re: Attachability
- Subject: Re: Attachability
- From: Peter Fine <email@hidden>
- Date: Sat, 10 Feb 2001 17:08:56 -0500
on 2/7/01 7:17 PM, Bill Briggs at email@hidden wrote:
>
I'm not sure what documents you're looking at, but on page 25 of the
>
APPLESCRIPT LANGUAGE GUIDE is the following, which is pretty close to
>
what I quoted from Cal's own Scripter User Guide yesterday. Except
>
that they include menus here (though I'm not convinced that a menu
>
item is an application object - the don't show up in any object
>
models).
I'm in over my head here. Could a menu be an application item, even if a
menu item is not? There are application dictionaries that treat menus and
menu items as objects in the AppleScript sense (if not the OOP sense), e.g.,
Smile, QuoEdit.
>
>
> Scripts in a "Scripts" menu are attached to that menu. The problem is that a
relatively large number of apps are attachable only to the extent of
providing a Scripts menu.
>
>
Well, aside from whose memory space the script runs in, OSA Menu
>
makes every application attachable, or virtually attachable. You just
>
want to be able to launch the script while the application in
>
question is frontmost, and that service is available, even better, it
>
allows hotkey launching. I see no difference in the material effect
>
between that and a script menu in an application.
I tend to use an application's Scripts menu if it has one and OSAMenu if it
doesn't. If I've understood what I've read on this subject (and maybe I
haven't), running the script in the application's context would be
preferrable to running it in the context provided by OSAMenu. I haven't done
any testing; perhaps the benefits are very small in most cases? Of course
OSAMenu does have problems in certain situations, problems that would not
occur in an application's context. There are some apps that have a
Scripts menu and support Menu Services (I think that's what it's called) so
you can have your keyboard shortcuts without worrying about shortcut
conflicts. Once again, e. g. Smile, but there are others.
>
> In "The AppleScript Scorecard Guidelines, Cal and Bill Cheeseman limit
"attachable" to mean "has a Scripts menu" and use "embeddable" for all other
aspects and instances of attachment.
>
>
Like I said, Cal contradicts that in his own user guide, and he
>
specifically doesn't mention menus. Embeddable seems an unnecessary
>
term. For my money he made more sense in what he wrote in the User
>
Guide than what he wrote the other day on the list. YMMV.
I could live with using "has a Scripts menu" to mean "has a Scripts menu"
and "attachable" to mean the other stuff. I'd just like to have some terms
that have generally understood meanings. I don't want to hear about
"tinkerable", though.
Peter