GLBasic forum

Main forum => GLBasic - en => Topic started by: Neurox on 2011-Jan-07

Title: Help, problem with open file (create and append) under iPhone
Post by: Neurox on 2011-Jan-07
I'm going crazy out.  :S
My last application for iPhone use a file for configuration.
Open the file for reading record, function well
but when I going to save o append record the GETLASTERROR$() return this:
0003 no such file. This is impossible because before the save/append I made a
control to file exist. And obviously the file exist!   :(
Someone can give me a solution?

Thank in advance

Paolo/Neurox
Title: Re: Help, problem with open file (create and append) under iPhone
Post by: MrTAToad on 2011-Jan-07
Where is the file being created ?
Title: Re: Help, problem with open file (create and append) under iPhone
Post by: Neurox on 2011-Jan-07
'Media' directory with all files of application.
Title: Re: Help, problem with open file (create and append) under iPhone
Post by: Ian Price on 2011-Jan-07
I don't think you can save to the Media file of your app. on iDevice.

You have to use something like this -
Code (glbasic) Select

GLOBAL save_config$
save_config$=PLATFORMINFO$("DOCUMENTS")+"/yourprogram.dat"

OPENFILE (1,save_config$,FALSE)
...
...
...
CLOSEFILE 1
Title: Re: Help, problem with open file (create and append) under iPhone
Post by: Neurox on 2011-Jan-07
Thanks Ian!  :enc:
I have implemented this function and now everything works.  =D =D