When methods from Microsofts COM interfaces are generated there are often very long methods:
for example in _Document.SaveAs():
@ComMethod
public void SaveAs(Object fileName, Object fileFormat, Object lockComments, Object password, Object addToRecentFiles, Object writePassword, Object readOnlyRecommended, Object embedTrueTypeFonts, Object saveNativePictureFormat, Object saveFormsData, Object saveAsAOCELetter, Object encoding, Object insertLineBreaks, Object allowSubstitutions, Object lineEnding, Object addBiDiMarks);
Ok, now, you can shorten this method as you wishes:
@ComMethod
public void SaveAs(Object fileName);
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:
@ComMethod
public void SaveAs(Object... someArgs);
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).
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).