NXP Home > News Archives > Further Newton Press Sillyness
2006-06-27 03:34:32 - Further Newton Press Sillyness
I've come to the conclusion that the developers of Newton Press were complete idiots.
In addition to the minutes vs seconds issue, and the odd choice of where / how to specify the three names of a newton book, they've also broken the newton package specification with regards to maps.
Inside a newton package Part one finds several objects, two of these are Frame, and Arrays. An array is a list of items. A frame is a list of items, and a special type of array called a "Map" which holds the names of the items in the frame.
Every object (this includes Arrays) has a "Class Ref" - this class ref is often either a set of flags, on/off switches with special meaning for the object (in particular, one of these specifies whether or not a map is sorted), or a pointer to the "name" of the object. In the case of a map - this Class Ref, according to Newton Formats 1.1, MUST be a set of flags, and not a pointer to a name. At first, I thought Newton Press followed this correctly.
That is, until I encountered a SuperMap situation. In order to save space, the first item in a Map's list of names can be a pointer to another Map, which we call a SuperMap, rather than a pointer to a name. The idea is that if you have a Map with a supermap, you treat it as if it's list of names were tacked onto the end of the SuperMap's list. This lets you have any number of maps that start with the same first few names, without taking up space to repeatedly spell out those names.
When you have a custom Icon in your book package, Newton Press tacks that information on by adding another item to the Main Frame of the book, at the same time it also makes the Map for this Frame longer by one. To do this it makes the frame's map be a 1 item long map (for the new icon) with a supermap pointing to the map which describes the other 14 entries in the Frame. So far so good.
The problem is that this extra map, which is tacked onto the end of the regular list of items in a book, doesn't have the right class ref. It's class Ref is supposed to be a list of flags, but instead, it's a pointer to the name "Array". NOTHING in Newton Formats says that any Map can have a name, it specifically claims that maps have lists of flags! Part of my original algorithm for reading frames and their maps out of a package relied on this fact, and I must now find some other method of differentiating between Maps and regular Arrays. GRRRR.
That's two fairly big deviations from the published standard, and a very odd choice with regards to package/book names. That this software was released to the public as is boggles my mind.
Comments:
Add a comment:
[url=http://blah.com]clickhere[/url], [quote=bob]blah[/quote], [quote]anonymous blah[/quote], [img=http://blah.com/smily.gif], [b]bold[/b],and [i]italic[/i].
I've come to the conclusion that the developers of Newton Press were complete idiots. GRRRR.
Full Stop :) Yes, you're right. In fact Newton Press wasn't even developed at Apple - it was farmed out to some other development firm whose name escapes me.