• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: SE2b GUI comments->Abbreviations!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SE2b GUI comments->Abbreviations!


  • Subject: Re: SE2b GUI comments->Abbreviations!
  • From: Kai <email@hidden>
  • Date: Thu, 23 Jan 2003 08:44:56 +0000

on Thu, 23 Jan 2003 02:33:36 +0000, has wrote:

> Philippe GRUCHET wrote:
>
>>>There could be a trade-off here, Philippe. I imagine the longer
>>>this list of synonyms, the fewer options we'd have for
>>>variable/handler names. (Rightly or wrongly, I've used quite a few
>>>of those abbreviations in my scripts.)
>>
>>Sorry for the ambiguity.
>> What I mean about abbreviations is keywords as they can be optionally typed
>> before checking the syntax, and not at all as a list of new synonyms.
>>
>>Well, a good trade-off could be a dozen of abbreviations instead of 1.
>>Just a little example:
>>
>>tell app "Finder" to act
>>-- when checking the syntax, keywords are expanded:
>>tell application "Finder" to activate
>>
>>I don't think that a such list of abbreviations would reduce the
>>variable/handler names options.
>
> Unfortunately, it would. For example: I hand you some source code
> containing the following line and you hit 'compile':
>
> set res to ASCII number char
> -->
> set result to ASCII number character
>
> Definitely not what you want - compile-time expansion (e.g.
> 'app'->'application') still ends up polluting the namespace. Any
> expansion has to happen as you type new code; that's the only point
> you can specify if you want the machine's version of what it thinks
> you want or not..

Thanks, has. I was about to reply to Philippe when I noticed you'd beaten me
to it[1]. I suppose you could demonstrate another manifestation of the
potential problem by trying to compile the cited example (app) as a
variable:

-------------------
set app to "Finder"
-------------------

--> Syntax Error: Can't set application to "Finder". Access not allowed.

==================================

[1] Don't you ever go to bed? ;-)

--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Textconverter?
  • Next by Date: Re: UI Scripting: Save as PDF
  • Previous by thread: Re: SE2b GUI comments->Abbreviations!
  • Next by thread: Re: SE2b GUI comments->Abbreviations!
  • Index(es):
    • Date
    • Thread