>This.Parameters.Count >This.Parameters.GetKey(1) >This.Parameters(m.lcKey) >This.Parameters.Item(1) >m.lnCount >m.lcKey >m.lnValueK >m.lnValueN >>Afterwards, the program can be resumed a line at a time, and what I observed is that the variables got the expected values but all others watches could not be evaluated, with the exception of This.Parameters.Count that evaluated correctly to 3.
m.loObject = CREATEOBJECT("someClass") m.loObject.SetParameter("id", 1) m.loObject.SetParameter("model", "Model name") m.loObject.SetParameter("description", "Model description") m.loObject.someMethod() DEFINE CLASS someClass as Custom Parameters = .NULL. FUNCTION SetParameter LPARAMETERS tcId, teValue IF ISNULL(This.Parameters) This.Parameters = CREATEOBJECT("Collection") ENDIF This.Parameters.Add(m.teValue, m.tcId) ENDFUNC FUNCTION someMethod *!* SET STEP ON *!* m.lnCount = This.Parameters.Count *!* m.lcKey = This.Parameters.GetKey(1) *!* m.lnValueK = This.Parameters(m.lcKey) *!* m.lnValueN = This.Parameters.Item(1) *!* m.lcDummy = "" && just to show the watches in the debugger CLEAR * Using FOR EACH FOR EACH luItem IN This.Parameters FOXOBJECT ?luItem * I don't know how to get the Key value of an luItem accessed this way ENDFOR ?"--" * Using FOR FOR lnIx = 1 TO This.Parameters.Count STEP 1 m.lcKey = This.Parameters.GetKey( lnIx ) ?m.lcKey ?This.Parameters( m.lcKey ) ENDFOR ENDFUNC ENDDEFINEWith your original code I see the same thing. The Items of the collection don't show up in the Locals treeview under the "Parameters" collection.