Re: Best Practices Issue
- Posted by "C. K. Lester" <cklester at yahoo.com> Feb 08, 2003
- 402 views
On Friday 07 February 2003 09:42 pm, you wrote: > > > Actually, I think you *can* do sequence operations on them, if you crea= te > them as sequences in the first place: > sequence SomeControls > SomeControls =3D {} > SomeControls &=3D create (whatever) > SomeControls &=3D create (something else) > SomeControls &=3D create (yet another control) In this case, the SomeControls sequence holds pointers, not the actual=20 values... Any functions that work with sequences of control pointers woul= d=20 have to know that, obviously... function sums( sequence vals ) -- add up a sequence of values atom total =09total =3D 0 =09for t=3D 1 to length(vals) do =09=09total +=3D vals[t] =09end for return total end function function sumc( sequence controlIDs ) -- add up a sequence of control IDs -- get values of all passed controls =09for t=3D1 to length(controlIDs) do =09=09s &=3D getValue( getText( controlIDs[t] ) ) =09end for -- add 'em all together return sums( s ) end function Something like that... It's an extra step when using no variables associa= ted=20 with the controls, but definitely doable.