• 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: names of a record's items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: names of a record's items


  • Subject: Re: names of a record's items
  • From: Shane Stanley <email@hidden>
  • Date: Thu, 10 Apr 2014 12:10:43 +1000

On 10 Apr 2014, at 11:26 am, 2551phil <email@hidden> wrote:

In short, user defined records have their key/value pairs 
stored internally as lists (making it possible to coerce them) whereas existing records store the key names according to the four letter class code.

Sort of. Take a record that includes both kinds of value:

{someLabel:1, button returned:"OK", text returned:"Blah", otherLabel:"Boo"}

If you run that in Script Debugger with the result set to AEPrint, you get this:

{ 'bhit':'utxt'("OK"), 'ttxt':'utxt'("Blah"), 'usrf':[ 'utxt'("someLabel"), 1, 'utxt'("otherLabel"), 'utxt'("Boo") ] }

You can probably get the idea from this. So 'bhit' is the code for button returned, 'ttxt' is the code for text returned, 'utxt' means text, and 'usrf' means user record fields. The square brackets designate a list, in this case of alternating labels and values. 

Now suppose you run this:

tell application "Finder" to properties of item 1

You get something similar:

{ 'pnam':'utxt'("Extra"), 'pidx':5, 'dnam':'utxt'("Extra"), 'nmxt':'utxt'(""), 'hidx':'fals'("false"), ... }

But in this case, the codes have no meaning except in the context of the Finder's dictionary.

-- 
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: names of a record's items (From: Luther Fuller <email@hidden>)
 >Re: names of a record's items (From: Alex Zavatone <email@hidden>)
 >Re: names of a record's items (From: Luther Fuller <email@hidden>)
 >Re: names of a record's items (From: Shane Stanley <email@hidden>)
 >Re: names of a record's items (From: 2551phil <email@hidden>)

  • Prev by Date: Re: names of a record's items
  • Next by Date: Re: names of a record's items
  • Previous by thread: Re: names of a record's items
  • Next by thread: Re: names of a record's items
  • Index(es):
    • Date
    • Thread