[Gambas-user] Why does gambas do this?

Benoit Minisini gambas at ...1...
Fri Mar 14 21:45:17 CET 2008


On vendredi 14 mars 2008, jbskaggs wrote:
> Okay I have tracked down what is happening in my program and I don't know
> why or what to do about it.
>
> I have a settings file.  When my program runs it writes either "a" or "b"
> to the file.  The file saves just fine.
>
> When the program loads (on my first form form_open) it opens the file reads
> it and if it reads "b" then it displays a button.
>
> fstart.text=file.Load("theme.txt")
> textlabel4.Text=fstart.Text
> IF Left$(fstart.Text)="b" THEN
>
> etc etc ....
>
> then problem is when the executable is made:  At the time the executable is
> made theme.txt ="a" .
>
> So that now if I run the executable it always says fstart.text="a"
> irregardless of what is actually in the theme.txt.
>
> Why is this?
>
> How do I get gambas to read the file and update fstart.text at form_open?
>
> JB SKaggs

Relative paths are files located in the project directory, and are always 
*read-only* when the executable is made. You can modify it when running the 
project from the IDE, as they are real files, but when the executable is 
made, these files become part of it, and so cannot be modified at all.

Regards,

-- 
Benoit Minisini




More information about the User mailing list