• 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: Creating list references in handlers. Bad code or bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Creating list references in handlers. Bad code or bug?


  • Subject: Re: Creating list references in handlers. Bad code or bug?
  • From: Victor Yee <email@hidden>
  • Date: Fri, 14 Sep 2001 12:21:24 -0400

On Fri, 14 Sep 2001 17:50:12 +0200, Helmut Fuchs wrote,

> At 10:26 Uhr -0400 14.09.2001, Victor Yee wrote:
> >I think that the problem is a matter of scope. References can only
> >refer to top-level or global varaibles.
>
> Not completely true.
>
> Run this:

[...]

> The reference
> from the handler above works like this: look up the property named
> "theList" from {theList:{1, 2, 3}}. And this always works!

Hmm... very interesting. It had been noted before that you could reference a script object in a similar way:

on theHandler()
script theData
property theList : {1, 2, 3}
end script
set theListReference to a reference to theList of theData
return contents of theListReference
end theHandler

theHandler()
--> {1, 2, 3}

So records are treated in a like manner?

By the way, I've never played with this type of structure and was wondering how people use it?

Victor


  • Prev by Date: Re: Creating list references in handlers. Bad code or bug?
  • Next by Date: Re: Sudden unusual behaviour with tell app commands
  • Previous by thread: Re: Creating list references in handlers. Bad code or bug?
  • Next by thread: Re: Creating list references in handlers. Bad code or bug?
  • Index(es):
    • Date
    • Thread