[NTLK] Developer question - Binary encoding?

From: John Anderson (dearjohn_at_everchanging.com)
Date: Wed Dec 11 2002 - 13:48:39 EST


Here's the Cocoa documentation on property lists, which are how I send
the data from the Newton to the Mac in order for it to be interpreted
by Cocoa:

----------------

In a well-formed property list, arrays are delimited by parentheses,
with individual elements separated by commas and optional spaces.
Dictionaries are delimited by curly braces, with key-value pairs
separated by semicolons, the key and value separated by an equal sign.
Strings appear as plain text if they contain no whitespace or enclosed
in straight quotation marks if they do contain whitespace. Data items
are delimited by angle brackets and encoded as hexadecimal digits.
Here's a short example of a text-format property list:

{
     Title = "Star Wars";
     Director = "Lucas, George";
     Cast = (
         "Hamill, Mark",
         "Fisher, Carrie",
         "Ford, Harrison"
     );
     "Thumbnail Image" = <040b7479 70656473 (many more sets of digits)
8484074e>;
}

----------------

So, my question is: how do I accomplish this encoding for binary
objects on the Newton, so I can transfer them to the Mac? And,
secondly, what do you consider to be the best way to transfer binary
data to the Newton? (Since I can run arbitrary scripts on the Newton, I
can send this data in pretty much any matter or format.) I can't really
reverse-engineer apps like NewTen because they're GPL, and I don't want
to risk being required to GPL NewtSync and all of its plugins
(including those that third party developers are building, since they
link against files in NewtSync).

Any thoughts/advice? Binary transfer (as well as strings) would be a
major boon to NewtSync.

John Anderson
everchanging

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
List FAQ/Etiquette/Terms: http://www.newtontalk.net/faq.html
Official Newton FAQ: http://www.chuma.org/newton/faq/



This archive was generated by hypermail 2.1.2 : Wed Jan 01 2003 - 10:02:14 EST