Arrays of field controls
MisterX
b.xavier at internet.lu
Sat Nov 20 10:10:07 EST 2004
just name your fields as
data1
data2
data3
then in your loop
repeat with x = 1 to azillion
put field ("data"&x) into array[x]
end repeat
if your fields are already alligned like having a field 1, field 2, etc..
you dont even need to name them!
put fld x into array[x]
cheers
X[array]
> -----Original Message-----
> From: use-revolution-bounces at lists.runrev.com
> [mailto:use-revolution-bounces at lists.runrev.com] On Behalf Of
> gwalias-rev at yahoo.com
> Sent: Saturday, November 20, 2004 15:53
> To: Revolution Mailing List
> Subject: Arrays of field controls
>
> Dear Revolutionaries
>
> Is there some way to refer to a group of controls as if they
> were in an array. Here's what I want to do ...
>
> I have several text fields for a user to enter information
> and once they click "Accept", I want to store them in a
> single array variable. I would like to be able to just
> iterate over the list of text fields and store each entry in
> the array, instead of having to go throughand explicitly
> reference each text field.
> That way, I can always add or remove fields without breaking
> the logic, or use the same approach in other parts of my
> program for different data.
>
> I apologise if this is an obvious question, I am still
> evaluating Revolution for the 30 days.
>
> Best
>
> Gordon
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list