Option menu

Michael D. dweeble at wi.rr.com
Sat Feb 17 12:54:16 EST 2007


Klaus
yes I have the itemdel set as
set the itemDelimiter to numtoChar(34),  with your help I see how this works 
now.
Thanks.
Michael


----- Original Message ----- 
From: "Klaus Major" <klaus at major-k.de>
To: "How to use Revolution" <use-revolution at lists.runrev.com>
Sent: Saturday, February 17, 2007 10:11 AM
Subject: Re: Option menu


> 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
> klaus at major-k.de
> http://www.major-k.de
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your 
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution 




More information about the use-livecode mailing list