This sounds like a good option with me. The call costs should be lower than in IEnumVariant approach. But if you in 99% percents you need only one target shouldn't we have a method for this to avoid array stuffs?
Thank you. Alex. On Mon, Mar 5, 2012 at 10:56 AM, James Teh <[email protected]> wrote: > Hi. > > Mick and I were discussing this same issue this morning. We haven't seen use > cases ourselves where there is a need for multiple targets for a given > relation type, though I'm sure that there are rare use cases; e.g. one > object which controls multiple objects, etc. Even where there are multiple > targets, I can't think of a use case where a client would want to retrieve > them one by one; it's probably going to be one or all. Therefore, I think > something like the following makes the most sense: > > [propget] HRESULT relationTargetsOfType > ( > [in] BSTR type, > [in] long requestedTargets, > [out, size_is(,*nTargets,)] IUnknown ***targets, > [out, retval] long *nTargets > ); > requestedTargets specifies the number of targets requested by the client. If > 0, all targets will be returned. This allows a client to easily retrieve > just the first target (or first n targets). nTargets is always set to the > number of targets returned. > > Jamie > > > On 5/03/2012 11:36 AM, Pete Brunet wrote: >> >> IATable2::selectedCells/Columns/Rows returns an array but the proposed >> new methods: >> >> https://wiki.mozilla.org/Accessibility/IA2_1.3#Relations >> https://wiki.mozilla.org/Accessibility/IA2_1.3#Hyperlinks_from_hypertext >> >> specify the return of an IEnumVARIANT. >> >> What is the reasoning for that? With the IEnumVARIANT you have to fetch >> the count (so you can allocate an array), the enumerator, and then the >> elements, taking at least three calls (or more if you want to fetch the >> elements one at a time). With the alternative approach we had used for >> IATable2 there is only one call. >> >> -- >> *Pete Brunet* >> >> >> a11ysoft - Accessibility Architecture and Development >> (512) 467-4706 (work), (512) 689-4155 (cell) >> Skype: pete.brunet >> IM: ptbrunet (AOL, Google), [email protected] (MSN) >> http://www.a11ysoft.com/about/ >> Ionosphere: WS4G >> >> >> _______________________________________________ >> Accessibility-ia2 mailing list >> [email protected] >> https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 > > > -- > James Teh > Director, NV Access Limited > Email: [email protected] > Web site: http://www.nvaccess.org/ > Phone: +61 7 5667 8372 > _______________________________________________ > Accessibility-ia2 mailing list > [email protected] > https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2 _______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2
