Do you have poblems with File Acces on PsPC

Discuss PocketC for CE (including Desktop Edition)

Postby Justinespinosa on Sun Jan 07, 2001 11:30 am

I don't know why, but on the PsPC, the
fileopen() command sometimes failed to open the files with no apparent reasons.
You can see it in pike and launchpad that the message "Didn't find any icons !" sometimes comes before the program reads the file !
This is a big bug.<img src=icon_smile_dead.gif border=0 align=middle>

But i have the solution. <img src=icon_smile_cool.gif border=0 align=middle>

you just need to do something like this.


<pre id=code><font face=courier size=2 id=code>

int fh;

fh = fileopen(filename,0,0);
if(fh =-1){
if(strlwr(fileenum(1,filename)) == strlwr(strright(filename,strlen(filename)-strrchr(filename,"\\")-1)))
while(fh=-1)
fh = fileopen(filename,0,0);

}else{
alert("file not found !");
}


</font id=code></pre id=code>

this is working fine and open always the file !
I hope this will help someone who got problems !


J.Espinosa

OUTS Softwares

Edited by - Justinespinosa on 01/08/2001 03:17:53
J.Espinosa

OUTS Softwares
Justinespinosa
 
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 3 guests

cron