Dynamically Building an Option list

Martin Baxter mb.userev at harbourhosting.co.uk
Thu Jul 5 17:07:00 EDT 2007


Stephen Barncard wrote:
>> I wish I could recall my question!... was trying
>>
>>  put zzz into the text of button "zzzz"
>>
>> but it is much simpler...
>>
>> here's breadboard example...
>>
>>
>>
>> ON mouseUp
>>
>>     put empty into userList
> 
> (not needed)
> 
>>
>>     open file "D:\users.txt" for read
>>
>>     read from file "D:\users.txt"  until EOF
>>
>>     put it into userList
>>
>>     close file "D:\users.txt"
>>
>>     ----xxxxxxxx----put userList into button "Users"
> 
>      set the text of button "Users" to userList
> 
> (assuming that userlist is a return delimited list)
> 
>>
>> END mouseUp
>>
>>
> 
> much simpler to do in one line
> 
> set the text of btn "userList" to URL 
> "file:C:\path\to\my\file\USERLIST.txt"

Hi Rob,

...except that, inside RR scripts we use forward slash in paths
on all platforms, so I think your script should be...

set the text of btn "userList" to URL "file:D:/users.txt"

Martin Baxter



More information about the use-livecode mailing list