Fulltrim produziert bei Arrays vom Typ Variant unter 5.x Fehler. Daher läuft Deine Anwendung im Client (da Notes 6 Clients), aber nicht im Browser (da Notes 5 Server).
Aus der KBASE:
Using a Variant Array in the LotusScript FullTrim Function Can Cause the Error: "Type Mismatch"
A call to the LotusScript FullTrim function can sometimes result in the following error:
"Type Mismatch."
Further research indicates that this occurs only when a Variant array is passed as the parameter, and the elements of the array contains no text other than spaces, tabs or newline characters.
For example:
Dim d(1) As Variant
d(0)=" "
d(1)=""
result=Fulltrim(d)
This issue has been reported to Lotus Software Quality Engineering. An attempt to fix this issue was made in Notes Domino 5.0.10, however, the fix resulted in undesired results in some cases and the fix was backed out in Notes Domino 5.0.11. Further attempts to fix this are being researched.
Workaround:
If the application allows, use a String array rather than a Variant array.
Supporting Information:
Additional code examples:
This code works without causing the error (since there is at least one element with a character other than a space, tab or newline).
Dim d(1) As Variant
d(0)=" "
d(1)="xyz"
result=Fulltrim(d)
This code works without causing the error because a String array is used:
Dim d(1) As String
d(0)=" "
d(1)=""
result=Fulltrim(d)
This code works without causing the error because a single variable Variant is used:
Dim d As Variant
d=" "
result=Fulltrim(d)
Excerpt from the Notes R5 On-Line Help:
FullTrim function
Takes an array and eliminates "empty" entries, or takes a string and eliminates duplicate, trailing and leading whitespace.
Syntax
FullTrim( v As Variant ) As Variant
Element
v
Any Array, String, or Variant containing a String.
Return value
A Variant containing a Array or String. If you pass in a String, you get back a String.
If you pass in an Array, you get back an Array.
Usage
Empty for strings is the Empty string.
Empty for numbers is the value 0.
Empty for Variants containing the above are the same. As Well as NULL and Empty.
The FullTrim Trims strings by eliminating any duplicate whitespaces (SPACE, TAB, NEWLINE) from the center of the string and all whitespace at the beginning and end of the strings.
The number of elements in a returned array may vary as empty elements are removed. If all the elements are removed, an array with one empty element is returned.
Related Documents:
The Recipient of a Memo Is Also Added to the CC Field on a 'Reply To All' in Notes 5.0.10
Document #: 1102557