Limitations of $ListNext
Hi!
I've encountered a peculiar behavior of $ListNext in Intersystems Cache, where I'm not sure whether I'm doing something wrong, or is it an intended behaviour.
First I am creating a ListOfDT from a string delimited with underscores:
Then I'm saving the tempList as a property of Persistent object
Do DataObj.%Save(1)
Then I'm trying to iterate over the saved list with $ListNext objectscript function:
//Some Code Here
All this happens within OnPreHttp() method of the CSP page (*.cls).
The error that I'm getting is as follows:
<LIST>zMethod+19^Class.1 : CSP Error: WHILE $LISTNEXT(DataObj.Services,ptr,value) {
There is no further description of what is wrong, just the <LIST> notation.
Meanwhile if I'm doing
}
The page runs without errors and I'm getting desired result.
Any suggestions what I could do to use the list saved in the object?
Thanks!
Fedor