The following item was discussed on the April 28 call:
http://www.linuxfoundation.org/en/Accessibility/IAccessible2/Minutes/20090428
11.Types for IAValue
Should the VARIANT types for IAValue be limited to VT_I4 and VT_BSTR?
- It was felt other numerics, especially floats, such at VT_R8 (double)
should also be allowed.
- For next time: Is VT_I4, VT_R8, and VT_BSTR sufficient? (There is also
VT_I8 to consider.)
- It was also felt that if the current value is a numeric then the min and
max should also be numeric and of the same type.
- It wasn't clear what to do if the current value is a BSTR. Pete will
check with some developers.
I guess there was no "next call", so the spec for IAccessibleValue VARIANT
types wasn't finalized.
It still isn't clear what to do if the current value is a BSTR, because
it's completely unspecified.
The interface description says IAValue represents a "numerical value":
http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/interface_i_accessible_value.html#_details
So I supported VT_I4, VT_I8, VT_R4, or VT_R8 (and VT_EMPTY). I didn't
implement VT_BSTR - I don't even look for it.
Then I fired up AccProbe and tried to set a value, and it sent me a BSTR!
I don't have a clue what to do with it. At the moment, I do nothing.
But IAccessibleValue::setCurrentValue doesn't spec any way to say I didn't
set the value, like maybe I shouold return S_FALSE, or E_INVALIDARG or
VT_EMPTY. (The spec for the "value" parameter has [out] in the
'Parameters:' list, but I assume that is a typo?)
My current thinking is that VT_BSTR should not be a permitted type. As a
server, if someone hands me a string and says "Here, set the numeric value
of this object based on this string", then unless we specify that string
precisely, the odds of me doing the right thing with that string are maybe
50-50. Is the string decimal or hex or octal? Does it represent a positive
or negative number? Is it comprised only of a string of digits? Can it
start with zeros? If so, what does that mean? Are letters allowed? Caps or
lowercase? Localized? Is whitespace allowed? Are expressions allowed?
Fractions? etc.... "-99", "BABE", "0x50F0", "76.5", "1.0", "1.00", "033",
"007", "10,000,000", "3/4", "2+2", "XXXVI", "one", "twenty-seven",
"quatre-vingt-dix-neuf", "pi", "root 2", "NaN". <grin>
I don't think it makes sense to allow BSTR without fully specifying it -
particularly as IAccessibleValue::setCurrentValue does not have a way for
me to say S_FALSE or E_INVALIDARG.
Can we specify the type of an IAValue as: VT_I4, VT_I8, (VT_R4?), VT_R8,
(VT_EMPTY for getters only?)
...but not VT_BSTR.
Car
_______________________________________________
Accessibility-ia2 mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/accessibility-ia2