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

Re: Records in handlers


  • Subject: Re: Records in handlers
  • From: Emmanuel <email@hidden>
  • Date: Mon, 6 Feb 2006 14:23:06 +0100

At 2:13 PM +0100 2/6/06, Jay Louvion wrote:
on GetDetails(who)
set TheRecord to {Mine:{theAddress:"email@hidden", thelink:"<http://www.ical.mac.com/jay/jay>http://www.ical.mac.com/jay/jay"}, His:{theAddress:"email@hidden", thelink:"<http://www.ical.mac.com/jay/him>http://www.ical.mac.com/jay/him"}}
return theAddress of who of TheRecord
end GetDetails


With a "Can't get who of {Mine:{theAddress:"email@hidden", thelink:"<http://www.ical.mac.com/jay/jay>http://www.ical.mac.com/jay/jay"}, His:{theAddress:"email@hidden", thelink:"<http://www.ical.mac.com/jay/him>http://www.ical.mac.com/jay/him"}}."; error. Rather fun to read, but kinda disappointing to a young scripter like myself.

When you want to use a variable as a key (you would like something like "set who to His"), then it may be time to work with p-lists. In a p-list, keys are normal strings so you would do something like:


set who to "His"
set oneRec to PlistChild theRecord key who
return theAddress of (PlistGet oneRec)

More details at: <http://www.satimage-software.com/en/plist_suite.html>

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Records in handlers (From: Jay Louvion <email@hidden>)

  • Prev by Date: Records in handlers
  • Next by Date: Re: Records in handlers
  • Previous by thread: Records in handlers
  • Next by thread: Re: Records in handlers
  • Index(es):
    • Date
    • Thread