I wonder if AT needs only one target then would the pointer to the pointer work as an array (like IUnknown* acc and pass &acc to the method)?
> IA2_2::nTargetsByRelationType([in] BSTR type, [out,retval] long *nTargets) > IA2_2::targetByRelationType([in] long targetIndex, [out, retval] IUknown > **target) >From implementation point of view that requires us to keep relations array in the cache to make the impl perfromant and do some cache invalidation. I wouldn't like this. Alex. On Tue, Mar 6, 2012 at 12:28 AM, Pete Brunet <[email protected]> wrote: > Then this would be very simple: > > IA2_2::nTargetsByRelationType([in] BSTR type, [out,retval] long *nTargets) > IA2_2::targetByRelationType([in] long targetIndex, [out, retval] IUknown > **target) > > In the rare cases where there is more than one target it wouldn't be much > (or noticeable) overheard to fetch the very small number of extra targets. > And often the count wouldn't even need to be fetched, e.g. nodeChildOf > should only have one target. > > > On 3/4/12 9:34 PM, Alexander Surkov wrote: > > 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 > > > -- > 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 > _______________________________________________ Accessibility-ia2 mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/accessibility-ia2
