[Gambas-user] save to a file
Bodard Fabien
gambasfr at ...11...
Wed Dec 22 23:36:41 CET 2004
Le mercredi 22 Décembre 2004 22:38, Jochen Georges a écrit :
> Hello gambonauts,
>
> PUBLIC SUB Button2_Click()
> File.Save("test2.txt", TextArea1.Text)
> 'have a look in this directory now!
> END
>
> this does not work.
> If the file already exist, i get a message "access forbidden".
Are you sure you have rigth to write on this file ?... in fact no and the
reason is simple test2.txt is in the executable archive... you need to write
for exemple :
File.Save(System.Home &/ "test2.txt", TextArea1.Text)
> If it does not, i get a message "file or directory does not exist"
normal
> I tried different things like:
MyFile AS File
OPEN system.home &/ "test2.txt" FOR CREATE WRITE AS myFile
CLOSE MyFile
File.Save(system.home &/ "test2.txt", TextArea1.Text)
>
> But I'm not successful yet :(
>
> Thanks for any hint.
No problem
> Jochen
>
Fabien Bodard
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real users.
> Discover which products truly live up to the hype. Start reading now.
> http://productguide.itmanagersjournal.com/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
More information about the User
mailing list