Le 31/07/2014 à 19:36, Paul Berkowitz < email@hidden> a écrit :
On 7/31/14, 1:43 AM, "koenig.yvan" <email@hidden> wrote:
But in real life, trying to get image's properties issue an error number -10000
In fact I identified it because I got the same error when I asked :
get properties of iWork items
which is a perfectly valid instruction.
It's only a valid instruction if the dictionary implements the 'properties' property of a class, by name, which this class apparently does not do, from what you have quoted of its dictionary entry. 'properties' is a not a built-in way of getting them all, even though it is a subheader in the dictionary (along with elements) for all class listings. It has to be implemented as a specific property of its own. Once upon a time, there were really very few classes that had these, but most of the OS X Cocoa Apple apps do have a 'properties' property for most classes, I've noticed, even when there may be only two or three other properties. This particular 'image' class in iWork does not have a 'properties' property, it seems. (I don't have iWork, so I'm relying on your excerpt.)
--
Paul Berkowitz I don't see any difference between what is written about images elements properties description (text) : Text associated with the image, read aloud by VoiceOver. file (file, r/o) : The image file. file name (file or text) : The name of the image file. opacity (integer) : The opacity of the object, in percent. reflection showing (boolean) : Is the iWork item displaying a reflection? reflection value (integer) : The percentage of reflection of the iWork item, from 0 (none) to 100 (full). rotation (integer) : The rotation of the iWork item, in degrees from 0 to 359.
and what is written, say, about shapes :
elements properties background fill type (no fill/color fill/gradient fill/advanced gradient fill/image fill/advanced image fill, r/o) : The background, if any, for the shape. object text (rich text) : The text contained within the shape. reflection showing (boolean) : Is the iWork item displaying a reflection? reflection value (integer) : The percentage of reflection of the iWork item, from 0 (none) to 100 (full). rotation (integer) : The rotation of the iWork item, in degrees from 0 to 359. opacity (integer) : The opacity of the object, in percent.
or about text items
elements properties background fill type (no fill/color fill/gradient fill/advanced gradient fill/image fill/advanced image fill, r/o) : The background, if any, for the text item. object text (rich text) : The text contained within the text item. opacity (integer) : The opacity of the object, in percent. reflection showing (boolean) : Is the iWork item displaying a reflection? reflection value (integer) : The percentage of reflection of the iWork item, from 0 (none) to 100 (full). rotation (integer) : The rotation of the iWork item, in degrees from 0 to 359.
iWork item n : An item which supports formatting elements properties height (integer) : The height of the iWork item. locked (boolean) : Whether the object is locked. parent (iWork container, r/o) : The iWork container containing this iWork item. position (point) : The horizontal and vertical coordinates of the top left point of the iWork item. width (integer) : The width of the iWork item.
properties of shapes and properties of text items behave flawlessly.
Images are the unique iWork items returning an error when we try to extract their properties.
Tables, cells, columns, rows, ranges are polite enough to return an empty list. These empty lists are not matching what is written in the dictionary but at least they don't issue a fatal error. With all other iWork objects : audio clips, shapes, charts, images, groups, lines, movies or text items, get properties return what is described in the dictionary.
So I have some difficulties to agree with what you wrote.
I’m not speaking of bug for the objects returning an empty list because I know that iPlay '13 is a game in progress. I’m just feeling that, even in a draft version, taking care to don't issue a fatal error would have been the normal behavior. After all, none of us asked Apple to rebuild from scratch the set of applications. I feel free to assume that doing that, they had to offer at least what was available in the preceding version which they didn’t. I’m not worrying too much because at this time if we want we may continue to use what is really a tool : iWork '09.
Yvan KOENIG (VALLAURIS, France) jeudi 31 juillet 2014 21:35:54
|