Hi Michael,

Hello
I have a fld with with a list of 100 or so lines with itemdel for the first item of each line. How can I get each lines item1 into the option menu ? so far this gets the first line of the fld into the option menu but not addtional lines.

put item 1 of fld "sortfld" into btn "menuS"

so I think its,
put fld "sortfld" into var
repeat with i=1 to the number of lines in var
put ? not sure here
end repeat
put var into btn "menuS"

You already set the itemelimiter, did I understand this correctly?

The fastest way will be:

...
set the itemdelimiter to XXX
## replace XXX with your itemdelimiter like TAB, "," or whatever!!!

put fld "sortfld" into var

## "repeat for each ..." is insanely fast, but READ ONLY!
## That means you cannot alter the variable (i in this case), only read the value(s)!
repeat for each line i in var

## In this loop we collect all the first items into a CR delimited list
  put item 1 of i & CR after newlist
end repeat

## Get rid of trailing CR
delete last char of newlist

put newlist into btn "menuS"
## Done :-)
...


Thanks for any  help
Michael

Best

Klaus Major
[EMAIL PROTECTED]
http://www.major-k.de

_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to