[Gambas-user] Can't create files...

Benoit Minisini gambas at ...1...
Thu Aug 26 09:34:41 CEST 2004


On Wednesday 25 August 2004 00:56, Amarok wrote:
> Hi...
>
> i have this on a program i'm creating:
>
> PRIVATE file1 AS File ' 1º ficheiro aberto
>
> PUBLIC SUB Form_Open()
>   'criar ficheiro Orglock (bloqueio a 2ª instancia)
>   OPEN "teste" FOR CREATE AS #file1 '
>     PRINT #file1, "Ficheiro Lock do Organizador... ";
>     PRINT #file1, "deve ser apagado caso o Organizador nao arranque"
>   CLOSE #file1
>
> END SUB
>
> now, at the point of "OPEN "teste" FOR CREATE AS #file1"
> I allways get the error "File or directory das not exist"
>
> I've try'd several combinations like:
> CREATE WRITE
> WRITE CREATE
> CREATE APPEND
> but none of them works
>
> If i create the file "test" myself, then the program opens it and write the
> text i've tell him to do.
> I want to put the created files in the same directory as the executable
> file, so i have the executable file in my home partition so I can have
> write access to it
>
> the system is Debian with kernel 2.4.27
>
> Can anybody teach me what am i doing wrong?
> Thank's in advance
> Amarok
>

You are not allowed to create file in the project directory. See your project 
directory as read-only for your application.

I admit that I should change the error message which is not very clear!

Regards,

-- 
Benoit Minisini
mailto:gambas at ...1...




More information about the User mailing list