[Gambas-user] File.Load = Null Object

Bodard Fabien gambasfr at ...11...
Sun Nov 28 15:54:28 CET 2004


Le dimanche 28 Novembre 2004 15:16, scatman a écrit :
> Hallo,
>
> i have a Problem with File.Load.
> I wrote this
>
> Dim dev[3] AS String
> Dim sTemp AS String
>
> IF Exist("/proc/ide/ide0/hda") THEN
>                 SHELL "cat /proc/ide/ide0/hda/media >" & sTemp  WAIT
>                 dev[0] = File.Load (sTemp)
>
> and Gambas tells me Error Null Object.
> The Tempstring exist. I dont know why, but in other Projects this Code
> works. Gambas RC3
>
> Look at the Screenshot ...


PUBLIC SUB Button1_Click()

  DIM dev[3] AS String
DIM sTemp AS String
stemp = "/home/gambas/tmp/temp.txt"
IF Exist("/proc/ide/ide0/hda") THEN
                SHELL "cat /proc/ide/ide0/hda/media >" & sTemp  WAIT
                dev[0] = File.Load (sTemp)
                
END IF

message(dev[0])

END



This work for me !!




More information about the User mailing list