[Gambas-user] SHELL is more faster than SUB Process_Read()

Fabien Bodard gambas.fr at ...626...
Sun Aug 15 21:32:58 CEST 2010


2010/8/15 Demosthenes Koptsis <demosthenesk at ...626...>:
> Hi i wrote a test program that "ls -1" a directory with 1700 and more files
> (mp3).
>
> i wanted to make a string as following
>
>  Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM
> Radio 128K- New Age 2- new experience of meditation and new age music -
> livestream 128k/" & sLine
>
> in order to list with full path the files.
>
> but i dont get the wanted result.
>
>
> The SHELL command runs faster than Process_Read.
>
> This mess up the result of concatenation.
>
> The code is the following:
>
> --------------------------------------------------------------------------------
> ' Gambas class file
>
> PUBLIC SUB Button1_Click()
>  SHELL "ls -1 \'/mnt/store/MUSIC/free/new age/webradio
> recs/Trancemission.FM Radio 128K- New Age 2- new experience of meditation
> and new age music - livestream 128k/\'" FOR READ
>
> END
>
> PUBLIC SUB Process_Read()
>
>  DIM sLine AS String
>  DIM Content AS String
>
> '  IF Eof(LAST) THEN RETURN
>
>  READ #LAST, sLine
>
>  Content = "/mnt/store/MUSIC/free/new age/webradio recs/Trancemission.FM
> Radio 128K- New Age 2- new experience of meditation and new age music -
> livestream 128k/" & sLine
>  PRINT Content;
>
>
> CATCH
> Message("Error code " & Error.Code & " Error message " & Error.Text)
>
> END
>
> --------------------------------------------------------------------------------
>
> Also i get EOF but the PRINT still runs in background.
>
> Is this behavior normal?
>
yes in the ide ... try this program in a console without the ide ...
for that generate an executable...

that's because the ide and qt make a buffer of not already showed
entries and the editor that is used to show the entry is a bit slower




More information about the User mailing list