• 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: referencing the list class?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: referencing the list class?


  • Subject: Re: referencing the list class?
  • From: Emmanuel <email@hidden>
  • Date: Thu, 10 Apr 2003 11:14:30 +0200

At 11:09 AM +1000 10/04/03, Malcolm Fitzgerald wrote:
I'm running this in Smile 1.8.8 under OS9.2

set the second_item to the second item of {"a", "b", "c"}
--> "b"
set the second_list_item to the second item of list {"a", "b", "c"}
--> ERROR: Can't get item 2 of list {"a", "b", "c"}
-- We can refer to it but we can't get it

What is happening here? Why is it that we can we can refer to the object? How can we get the object?

In AppleScript, "reference" is not - like C or Pascal programmers could think at first sight - something like a pointer. It's more like an "include". It will accept more or less any expression whose syntax is correct. For instance, you could say "set x to window 1 of window 1" even if "window" is not an element of "window". Then when you try to resolve the reference, of course, things become serious. I think that "list {"a", "b", "c"}" is an expression that cannot be resolved.

Emmanuel
_______________________________________________
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.

References: 
 >referencing the list class? (From: Malcolm Fitzgerald <email@hidden>)

  • Prev by Date: referencing the list class?
  • Next by Date: Re: referencing the list class?
  • Previous by thread: referencing the list class?
  • Next by thread: Re: referencing the list class?
  • Index(es):
    • Date
    • Thread