• 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: More about Records
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More about Records


  • Subject: Re: More about Records
  • From: Paul Berkowitz <email@hidden>
  • Date: Tue, 02 Jan 2001 17:37:55 -0800

On 1/2/01 4:47 PM, "Richard 23" <email@hidden> wrote:

> Two referenced values (or objects) can appear to
> be the same but if they don't reference the same object, they
> are not said to be equal.

Thank you, Richard. I suppose we should be grateful (or not?) that

r1's {a, b}
-- {1, 2}

Strictly speaking, I guess this must be using the implicit "get" to evaluate
the contents?

Yes:

set r1 to {a:1, b:2, c:3}
set r2 to {a:1, b:2, c:75}

r1's {a, b}
-- {1, 2}
r2's {a, b}
-- {1, 2}
(get r1's {a, b}) = (get r2's {a, b})
-- true
(get {r1's a, r1's b}) = (get {r2's a, r2's b})
-- true

So that's another way. I'm familiar with this 'get' technique for apps that
don't evaluate application elements or properties unless you use 'get' or
first set them to a variable, unless the 'get' is implied when there's no
other event. Bit I didn't realize that there was something more-or-less
equivalent within AppleScripts itself.

> Fortunately we do have contains.

> r1's {a, b} contains r2's {a, b}
> -- true

And that's another great technique I didn't know.



--
Paul Berkowitz


References: 
 >Re: More about Records (From: Richard 23 <email@hidden>)

  • Prev by Date: Droplet and Aliases...how?
  • Next by Date: Re: Stay Open
  • Previous by thread: Re: More about Records
  • Next by thread: Re: More about Records
  • Index(es):
    • Date
    • Thread