• 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: Stephen Swift <email@hidden>
  • Date: Tue, 05 Feb 2002 00:10:50 -0500
  • Method-key: Ydco m.ooai. jrm.o uprm yd. e.ot ru Oy.ld.b Xgpbdam O,cuyv

At 2/4/02 9:16 PM, email@hidden (email@hidden) Wrote:

> What you call a record is a 'property'. What you call a list is a record.
> That
> is,
>
> {hello:"goodbye",Brian:5,jane:6,leslie:{2,3}}
>
> is a record, containing 4 properties: hello, Brian, jane, and leslie.

Ah, okay, I'll be more careful as to what I call my components of my script.
Having been self-taught, I never bothered learning the actual name for
anything, and called it whatever the heck I wanted to. ::mutters property &
record & property & record... ::
>
> So if you want the new value to be put in the record only if it doesn't
> already
> exist, put it in on the right side of the concatenation, If you want the new
> value to replace the old, put it on the left. For example,
>
> {hello:"goodbye",Brian:5,jane:6,leslie:{2,3}} & {hello : "adios"}
> --> result: {hello:"goodbye",Brian:5,jane:6,leslie:{2,3}} (unchanged)
>
> {hello: "adios"} & {hello:"goodbye",Brian:5,jane:6,leslie:{2,3}}
> --> result: {hello:"adios",Brian:5,jane:6,leslie:{2,3}} (property changed)

Ah, okay. This is excellent. But for example, say I had a property
{leslie:{3,2}}. I wanted to change the first item of leslie (2) to the new
first item (3) but wanted to keep the old 2nd item of leslie (3) and *not*
replace it with the new 2nd item (2). Is my only option to go
Set item 1 of leslie to 3 ? I want to avoid having to refer to the
record property names as much as possible.

>> Silly as it may sound, sometimes I wish there was a coercion string to
>> variable some days.
>
> There is one: "run script yourString" returns the contents of the named
> variable. :-)

Ah, could you expand upon this please?

Stephen Swift
email@hidden
-----------------------------------------------
AppleScript Guru - The Mac Observer
http://www.macobserver.com/tips/applescript


References: 
 >Re: My Worrisome Lists :-) (From: email@hidden)

  • Prev by Date: Re: applescript --> apple event
  • Next by Date: Re: bug in rest of list?
  • Previous by thread: Re: My Worrisome Lists :-)
  • Next by thread: Re: My Worrisome Lists :-)
  • Index(es):
    • Date
    • Thread