• 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: My Worrisome Lists :-)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: My Worrisome Lists :-)


  • Subject: Re: My Worrisome Lists :-)
  • From: email@hidden
  • Date: Wed, 6 Feb 2002 19:32:30 -0500

Wed, 6 Feb 2002 16:59:37 +0000, has <email@hidden> suggested,

> Scott Norton wrote:

> >Although you might consider
> >all storage of the script to be properties of the script, and so should
expect
> >me["myvar"] to be the variable myvar.
> >
> >Above, I'm using Javascript syntax for an associative array. What might the
> >AppleScript syntax be? Perhaps 'property "Brian" of myRecord'
>
> How about 'item "Brian" of myRecord'? I think 'property' might get confused
> with its current use.

[...]

> What d'you think?

Good point. This is the "Name" reference form, already part of the language.
When I wrote, I'd forgotten that "item" was the all-inclusive class name.
Instead I had focused on the definition of a record as a collection of
properties, not of items. In fact, this improvement would give us associative
arrays, and lists and records become the same thing.

item 5 of myArray
and item "Bob" of myArray

become parallel constructions.

Another pitfall of my proposed syntax is that "property" has special meaning to
the compiler. If I write,

set WallyBaloo to "Bob"
property WallyBaloo of {Bob:42, Ray:53}

the compiler sees the keyword 'property,' and expect this to be a property
definition

property WallyBaloo : 0

and complains when it doesn't see the ':' or equivalent verbiage.

And I'd like my double fries to be lightly salted, and the strawberry shake to
be shaken, not stirred... :-) (If we're going to wish, we might as well make
the wishes specific....)
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden
_______________________________________________
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: do shell script
  • Next by Date: Re: Files of folder returns 0 ...
  • Previous by thread: Re: My Worrisome Lists :-)
  • Next by thread: New guy here!
  • Index(es):
    • Date
    • Thread