• 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: Converting Associative List to Record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting Associative List to Record


  • Subject: Re: Converting Associative List to Record
  • From: Deivy Petrescu <email@hidden>
  • Date: Thu, 6 Nov 2003 19:32:39 -0500

On Nov 6, 2003, at 7:28 AM, Frank wrote:

As a new Applescript user I was wondering if there is an easy way to create records from associative list:

For example to convert the list

{"name", "Frank", "city", "Brussels"}

to

{name: "frank", city: "Brussels"}

Best Regards,

Frank

Here is the *best* solution:

set lista to {"name", "Frank", "city", "Brussels"}


to usrf(theList)
script
{+class usrf;:theList}
end script
run script the result
end usrf

set usrfList to usrf(lista)

_______________________

Unfortunately it is not mine! It is Olof Hellman's.

But hey, go ahead and use it, he will not complain.


Regards

Deivy
http://www.dicas.com/
_______________________________________________
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: 
 >Converting Associative List to Record (From: Frank <email@hidden>)

  • Prev by Date: Re: Volume index bug in Panther?
  • Next by Date: Re: Converting Associative List to Record
  • Previous by thread: Re: Converting Associative List to Record
  • Next by thread: Re: Converting Associative List to Record
  • Index(es):
    • Date
    • Thread