Am 11.11.2010 15:13, schrieb NW:
> On Thu, 11 Nov 2010 09:03:14 +0100
> Rolf-Werner Eilert<eilert-sprac...@t-online.de>  wrote:
>
>> Hi Neil,
>>
>> Nice to read your code. Here are some comments on it:
>>
>>
>> Anyway, for simple textfile input/output, File.Read and File.Save will
>> be your friends.
>>
> As a follow up to this.
>
> I have searched around via Google and my A Beginner's Guide to Gambas book 
> but I just cannot find out how to use File.Read and File.Save. Can anyone 
> please start me off? I have played around with ideas for it but keep getting 
> error messages.
>
> Many Thanks
>
> Neil
>

Sure, and Fabien has already given the example, so I quote him here. 
Copying his mail, I find something interesting he mentioned right at the 
beginning. I've never used that stuff, so just give it a try :-) Here is 
what he wrote:


have you tryed to replace result by a global string variable  ?

textbox use utf8 charset

and yes in your case ... use file.save


to resume your code

Private $sResult as string

PUBLIC SUB Button1_Click()

   $sResult = File.Load("/home/neilwin/basic/trial.txt")

END

PUBLIC SUB Button3_Click()

   File.Save("/home/neilwin/basic/trial.txt", $sResult)

END





Regards

Rolf

------------------------------------------------------------------------------
Centralized Desktop Delivery: Dell and VMware Reference Architecture
Simplifying enterprise desktop deployment and management using
Dell EqualLogic storage and VMware View: A highly scalable, end-to-end
client virtualization framework. Read more!
http://p.sf.net/sfu/dell-eql-dev2dev
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to