-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of ellipsis in ProxyObject #630
Comments
How can I get a "feature request" label for this issue? |
Very well... ;-) Bought. |
What must I keep in mind when I create unit tests? On which platform will they be executed? Which COM objects can I expect to be there? |
The unittests are filtered by platform (see the existing tests) (build.xml, lines 115-123). I'd suggest you place the test for vararg calls in ProxyObject_Test.java. The COM objects, well choose something everybody has. There are office based tests, but I'd try to stay away from that, for example I'm on a test version which will expire. IE should be available everywhere, ShellUtils. Thinking about varargs: Navigate2 from the IWebBrowser2 interface could be a good candidate. |
@matthiasblaesing you answered to my recent commit:
Hmm... that's right. But in the method So, how to deal with this? Global variables? :-) ok, just kidding... |
Move the logic to ProxyObject#invoke - there you have the method for reflection and the arguments in their caller shape, unwrap/rewrap it and pass it on to invokeMethod. |
feature #630: use of ellipsis/varargs in COM methods
Merged with 4b7421c |
When methods from Microsofts COM interfaces are generated there are often very long methods:
for example in _Document.SaveAs():
Ok, now, you can shorten this method as you wishes:
The ProxyObject is so cute to deal with this shortened method.
But perhaps you now find out, that you need the next parameter: fileFormat. So: you must add the
parameter and perhaps correct the former calls with the one parameter...
So my question is: would it not much better if we can use the ellipsis feature from java to generate an additional method like this:
Now we can call the method with as many parameters as we wish. :-)
Any opinions to this? Would it be a problem, when you want to transfer real arrays as parameters? But when I am right, then there is no SAFEARRAY-handling in the COM.util.Convert class (so far).
The text was updated successfully, but these errors were encountered: