FBA The Creator
http://www.fbacreator.com/fbaforum/

to store informations in a file with WM2003
http://www.fbacreator.com/fbaforum/viewtopic.php?f=2&t=89
Page 1 of 3

Author:  alxpatrick [ Sat Jul 05, 2008 1:12 pm ]
Post subject:  to store informations in a file with WM2003

Hello.

It seems to be a problem when storing informations in a file by using openfile, readfile, writefile... functions with Windows Mobile 2003 (version 4.21.1088). Indeed, when I run my application (using files), she runs perfectly on my phone, with WM5. But with my pocket PC (WM2003) the strictly same application isn't be able to read or write the files.

If somebody knows a solution, I should be very glad to know it.

Best regards.

Author:  Boiled Sweets [ Sat Jul 05, 2008 1:30 pm ]
Post subject:  Re: to store informations in a file with WM2003

Please post a code example here.

Author:  alxpatrick [ Sat Jul 05, 2008 2:34 pm ]
Post subject:  Re: to store informations in a file with WM2003

Here you are an example:

function onmainloop()

if fileexists("filetest.dta") then
myfile = openfile("filetest.dta","read",false)
print(20,15,readfile(myfile,4),0,0,0)
closefile(myfile)

end


function onquit()

myfile = openfile("filetest.dta","write",false)
writefile(myfile,"test")
closefile(myfile)

end


On the first attempt, nothing appears on the screen, what is normal: The file doesn't exists.
When opening the application for the second time I want the application show us the word "test".
That works when using my phone with Windows Mobile 5, but nothing appears when using my pocket pc with Windows Mobile 2003.

Thanks

Author:  alxpatrick [ Sat Jul 05, 2008 4:23 pm ]
Post subject:  Re: to store informations in a file with WM2003

I've encounter the same problem when using the number 11 tutorial witch name is "handling.config.files".

This soft is unable to store the values when used with Window Mobile 2003 meanwhile it is able to do it with WM5.

Author:  evilmaio [ Sat Jul 05, 2008 6:37 pm ]
Post subject:  Re: to store informations in a file with WM2003

While i'm pretty sure it should work, I haven't a windows mobile 2003 device to test that, sorry;
I'll try to check this on ARM emulators in my spare time.

can you give us more info? for example:

- full path of fba.exe when you launch it on your ppc
- is the file created the first time and then it isn't read or you can't even find it?

Just a note, opening|closing|reading a file continuously in a main loop, is BAD,
also for tests :)

Author:  alxpatrick [ Sat Jul 05, 2008 7:05 pm ]
Post subject:  Re: to store informations in a file with WM2003

Sorry, but it didn't work. I'm sure you will find a solution. So, I have found a solution for those who want to store information and who want to be sure that WM2003 will accept the storage: Use the openconfigext function. I tested it and it works meanwhile Openconfig and openfile don't work.

I hope this post will help somebody...

As far as I am concerned, my problem is solved by using openconfigext. Thank you evilmaio for your future check. Be advised that all your other sample applications work properly on WM2003.
If I can help you...I'll do it with pleasure.

Best regards

Author:  evilmaio [ Sat Jul 05, 2008 7:09 pm ]
Post subject:  Re: to store informations in a file with WM2003

Can you post full (bugged) code? I`ll check with that on emulators.

thanks

Author:  alxpatrick [ Sat Jul 05, 2008 7:26 pm ]
Post subject:  Re: to store informations in a file with WM2003

In order to answer your questions:

-full path of fba.exe when you launch it on your ppc?
I have launch it in "My Pocket PC/program files/test/"

- is the file created the first time and then it isn't read or you can't even find it?
I can't even find it.

Remarks: Don't worry, reading or writing the file occur just once in the loop. I have cleared the code before to send you, because it was very long.
Bye.

Author:  alxpatrick [ Sat Jul 05, 2008 7:29 pm ]
Post subject:  Re: to store informations in a file with WM2003

I don't know how to send you the code: it's long. But, you know, your number 11 sample encounter the same problem. You can make the test with it if you want.

Author:  evilmaio [ Sun Jul 06, 2008 12:13 am ]
Post subject:  Re: to store informations in a file with WM2003

Files written by openconfig (tutorial 11), are created within a directory 'userdata' that is automatically created by FBA...can you find this directory on your device?

Page 1 of 3 All times are UTC
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/