--- In [email protected], "Sheri" <sheri...@...> wrote:
>
> --- In [email protected], "Sheri" <sherip99@> wrote:
> >
> > 
> > Possibly this is just the unique way Adobe chose to do it, and I
> > was misled by the application's documentation?
> 
> There is actually a descrepancy in parameter types as per the Parameter 
> "type" and the help string for the previously discussed Search method. The 
> application documentation presents the Parameter types from the help string 
> instead of from the real Parameter Type. I think the reason they are variants 
> in this case is because they are optional parameters.
> 
> Following clipped from the vbaccelerator TLBHelp Browser window.
> 
> Note the parameters are all "variants" yet in the help string they are 
> "string" and "boolean". The application documentation shows the "Parameter 
> Type" for those parameters as "String" and "Boolean"

Yeah, they're saying in help what they expect the Variant to turn out to be.  
Hopefully they will have done the Right Thing in their code, so when e.g. the 
code for Search function runs, it will take whatever comes in first parameter 
and coerce it to a BSTR, whatever comes in as thirst param and coerce it to 
bool, etc.

And yes, they all have to be decalred variant because they're all optional.  
COM parameter rules.

Also explains wehere i got idea the parameters might have help strings: I saw 
this output from the adobe TLB you posted up 
in vbaccelerator TLBHelp, remembered seeing the parameter descriptions, jumped 
to conclusion that TLBHelp and somehow found those parameter descriptions.  It 
hadn't, it had just found the usualtype description you get with 
ITypeInfo::GetDocumentation.

> Public Function Search(Optional ByVal For As Variant, Optional ByVal 
> WholeWord As Variant, Optional ByVal CaseSensitive As Variant, Optional ByVal 
> ReplacingWith As Variant) As Objects 'Look for occurrences of text that 
> matches specific criteria / Return value: The found or replaced text / For: 
> What to look for as String / WholeWord: If true, then disregard text embedded 
> within a larger word as Boolean / CaseSensitive: If true, then search only 
> for text that matches case as Boolean / ReplacingWith: What to replace the 
> found text with, either a string or a special character as String



Reply via email to