• 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: resetting record values to ""
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: resetting record values to ""


  • Subject: Re: resetting record values to ""
  • From: "Bryan" <email@hidden>
  • Date: Tue, 02 Jan 2001 15:04:44 -0500

OK, now this is odd:

--*Compiles but returns runtime error:

set {month, state} to {1, "FL"}
--Can't set state to "FL"

--*Compiles and runs:

set {month, |state|} to {1, "FL"}
-- {1, "FL"}

--*but then returns incomplete data:

return {month, |state|}
-- {month, "FL"}

--*So, it has to be:

set {|month|, |state|} to {1, "FL"}
-- {1, "FL"}
return {|month|, |state|}
-- {1, "FL"}

Bryan


----------
>From: Michelle Steiner <email@hidden>
>To: "John W Baxter" <email@hidden>, "Applescript-Users"
<email@hidden>
>Subject: Re: resetting record values to ""
>Date: Tue, Jan 2, 2001, 12:05 PM
>

> On 1/2/01 8:33 AM, John W Baxter <email@hidden> wrote
>
>>All this is a little more visible if you have keywords and variables styled
>>differently in you AppleScript preferences.
>
> I do. Keywords are underlined and variables are green. That's how I
> spotted "state" and "month" among the labels in that record. And that's
> why I couldn't understand how a keyword could be used as a record label,
> which is in essense a variable.
>
> Here's something else.
>
> set month to "January"
>
> does not compile, of course, but
>
> set state to "NY" does compile, but gives a run-time error.
>
> --Michelle
>
> ----------------------------------------------------------------------
> | Michelle Steiner | Hard as it may be to believe, my |
> | email@hidden | life has been based on a true story. |
> ----------------------------------------------------------------------
> _______________________________________________
> applescript-users mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/applescript-users


  • Prev by Date: Re: De-Selecting all selected files/folders
  • Next by Date: Re: applescript-users digest, Vol 2 #176 - 18 msgs
  • Previous by thread: Re: resetting record values to ""
  • Next by thread: Re: resetting record values to ""
  • Index(es):
    • Date
    • Thread