QT: How do I show the contents of listed TXT files?

Klaus Major klaus at major-k.de
Wed Aug 20 09:04:54 EDT 2008


Dag William,

> Hi there,
>
> I got a question which got me puzzled for a while now.
> I want to list the .TXT files in the defaultfolder and that works OK
> with the following script:
> on mouseUp
>  set the defaultFolder to "foldername"
>  put the files into field "contents"
> end mouseUp
>
> Now I want to show the contents of the .TXT files in field
> "contents2'" when I click on them.
> And thats where I am stuck!
>
> I can click on the listed TXT files but what do I need to do to show
> the contents of the clicked TXT file in field "contents2"?

...
put url("file:" & the selectedtext of fld "contents") into fld  
"contents2"
...

> Thanks for your help!

Graag gedan :-)

> Greetings,
>
> William de Smet

Best

Klaus Major
klaus at major-k.de
http://www.major-k.de





More information about the use-livecode mailing list