tradiate <[EMAIL PROTECTED]> wrote:
>> // JavaScript
>> var arr = myComponent.getArray({});
>
> Thanks, Igor.  This is very close to what I need.  Is there a way to
> set things up so that the JS code doesn't have to be coded as
> xxx.getArray({})?  I'd like to lose the {} in the parm list

I'd like to myself, but I don't know of any way to do that. XPConnect 
requires that "out count" parameter, and even though the script can 
ignore it (it's available via arr.length) it still has to provide the 
placeholder for it. Otherwise XPConnect complains about parameter 
mismatch.

I'm afraid this is as clean as it gets. An alternative would be 
returning something like nsISupportsArray, which is a royal pain for the 
script to work with.
-- 
With best wishes,
    Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not 
necessarily a good idea. It is hard to be sure where they are going to 
land, and it could be dangerous sitting under them as they fly 
overhead. -- RFC 1925


_______________________________________________
dev-tech-xpcom mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-xpcom

Reply via email to