How do the Dolphin-generated COM classes and methods deal with optional
parameters in COM functions. For example, I needed to use the MS Word
COM function Open, which applies to a Document object. The Dolphin
wrapper method has this signature:
open: fileName confirmConversions: confirmConversions readOnly: readOnly
addToRecentFiles: addToRecentFiles passwordDocument: passwordDocument
passwordTemplate: passwordTemplate revert: revert writePasswordDocument:
writePasswordDocument writePasswordTemplate: writePasswordTemplate
format: format.
Everything but the fileName is an optional parameter in the actual COM
function. I called the Dolphin wrapper like this:
docs open: s confirmConversions: false readOnly: false
addToRecentFiles: false passwordDocument: '' passwordTemplate: ''
revert: false writePasswordDocument: '' writePasswordTemplate: ''
format: false.
That call worked, but I wonder if there may be a simpler way. Could I
have passed "nil" for the optional parameters I didn't care about? Or
0?
And finally, how does the 'Variant' type affect this whole thing? I'm
not familiar with the 'Variant' type as wrapped by Dolphin. Is there a
way to say something like "nil asVariant"?
TIA,
John Whittaker
Sent via Deja.com
http://www.deja.com/