Re: plist data type 'data'
Re: plist data type 'data'
- Subject: Re: plist data type 'data'
- From: Stan Cleveland <email@hidden>
- Date: Tue, 08 Oct 2013 12:35:30 -0700
On Oct 8, 2013, at 11:12 AM, Luther Fuller wrote:
> I did some rewriting on my Property List Tutorial and noticed that a plist file can contain data of type 'data'.
> AppleScript can read and write variables of this type, but there is no AppleScript class that corresponds to type 'data'. Any attempt in AppleScript to use or modify the value in a variable of type 'data' results in an error.
>
> So, I'm curious … What is type 'data'? (Surely someone will know.)
Hi Luther,
The "data" class in AS looks like this:
set someData to «data 0123456789ABCDEF»
It's used for storing the raw bytes of binary objects, such as images. Only hexadecimal characters are allowed. There's a little information about it in Apple's "AS Language Guide" in "Appendix D: Double Angle Brackets". And there's a little more information in Matt Neuburg's "AS: The Definitive Guide", 2nd Ed, on page 221.
If you copy a small image to the clipboard, then run the following, you'll get "data" class information returned.
the clipboard
Warning: copy a small image, because a large one will take *forever* to return.
HTH,
Stan C.
_______________________________________________
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