for each loItem in loItems loItem.Field2 = loItem.Field2 && Needs to be done for every value changed! * or anything that'd query Field2. ie: * =loItem.Field2 gather name loItem memo2) Better
for ix=1 to loItems.Count loItem = loItems(ix) gather name loItem memo * Directly : * gather name loItems(1) memo errors !!!3) Better or best (works in older versions too:)
Local loTest loTest = Createobject("TestClass") loTest.MainMethod() Return Define Class TestClass As Custom Function MainMethod Local ARRAY loItems[1] This.MakeTable() This.GetItems(@loItems) Select Items LOCATE For Each loItem In loItems *-- LoItem.Field2 = "Changed" Gather Name loItem Memo If Not Eof() Skip 1 Endif Endfor *-- But it doesn't here Browse Normal Nocaptions Endfunc Function GetItems LPARAMETERS taItems Select Items DIMENSION taItems[RECCOUNT()] Scan Scatter Name taItems[RECNO()] Memo taItems[RECNO()].Field2 = "Changed" Endscan Endfunc Function MakeTable Local lnCount Create Table Items(; Field1 N(4), ; Field2 C(10)) For lnCount = 1 To 3 Insert Into Items Values (lnCount,"Record " + Transform(lnCount)) Endfor Endfunc EnddefineCetin