Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is list of objects giving "Illegal Parenthesized Reference" error when adding to it via LotusScript agent?
    text
    copied!<p>Have this line of lotusscript code in an agent that gives an "Illegal Parenthesized Reference: Items" error:</p> <pre><code>Set tempObligor.Facilities.items(Cstr(facilitydoc.requestnum(0))) = tempFacility </code></pre> <p>Facilities.items is defined as a list of objects.</p> <p>So not getting why error is being thrown by the Notes 8.5 designer.</p> <p>Equally odd that this worked without problem in Notes 8.0.2.</p> <p>Code that makes up the objects is below.</p> <p>Let me know if you have any ideas.</p> <p>Believe I can do a work around by using a FOR loop that goes through all values looking for a match... but not knowing why the error is occurring bugs me...</p> <pre><code>Dim tempObligor As Obligor 'This line errs out - does not like () after .items Set tempObligor.Facilities.items(Cstr(facilitydoc.requestnum(0))) = tempFacility Class Obligor As CollectableObject Public Facilities As SortableList End Class Class CollectableObject ' STUB End Class Class SortableList Public items List As CollectableObject Private Sub Sort() Dim uboundarray As Integer Dim nextTag As String Dim x As Integer Dim sortedArray As Variant Dim ArrayToSort() As Variant uboundArray = 0 Forall elem In items NextTag = Listtag(elem) Redim Preserve ArrayToSort(uboundArray) ArrayToSort(uboundArray) = NextTag uboundArray = uboundArray + 1 End Forall SortedArray = SortArray(ArrayToSort) Dim TempList List As CollectableObject For x = 0 To Ubound(SortedArray) Set TempList(SortedArray(x)) = items(SortedArray(x)) Next Erase items Forall elem In TempList Set items(Listtag(elem)) = TempList(Listtag(elem)) End Forall Erase TempList End Sub Function SortArray(ArrayToSort) As Variant Dim NumberOfElements As Integer Dim temp As String Dim x As Integer Dim y As Integer NumberOfElements = Ubound(ArrayToSort) If NumberOfElements% = 0 Then SortArray = ArrayToSort Exit Function End If For x = 0 To (NumberOfElements) For y = 0 To ( NumberOfElements - x - 1) If Ucase$(ArrayToSort(y)) &gt; Ucase$(ArrayToSort(y+1)) Then temp = ArrayToSort(y) ArrayToSort(y) = ArrayToSort(y+1) ArrayToSort(y+1) = temp$ End If Next y Next x SortArray = ArrayToSort End Function End Class </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload