Dynamically Building an Option list
Eric Chatonet
eric.chatonet at sosmartsoftware.com
Thu Jul 5 17:08:46 EDT 2007
Hi Rob and all,
As I said in a previous post, the contents of any menu *must* be set
at mouseDown:
Setting it at mouseUp does not make sense :-)
The rest is cooking...
Le 5 juil. 07 à 23:07, Martin Baxter a écrit :
> 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
Best regards from Paris,
Eric Chatonet.
----------------------------------------------------------------
Plugins and tutorials for Revolution: http://www.sosmartsoftware.com/
Email: eric.chatonet at sosmartsoftware.com/
----------------------------------------------------------------
More information about the use-livecode
mailing list