[Gambas-user] Too many open files error message

richard terry rterry at ...1946...
Tue May 4 23:26:53 CEST 2010


On Tuesday 04 May 2010 21:44:48 Dimitris Anogiatis wrote:
> Hey Ricard,
> 
> just as a quick workaround try replacing the Open - Close code with
> 
> File.Save(sFilename, sHTML)
> 
> You might circumvent the "Too many files open" error, which I am unsure why
> it comes up.
> 
> Perhaps the total number of open files within your project is too much or
> the opening and closing
> of your files happens too fast and some of the files don't get the chance
>  to close properly...
> just guessing here...
That sounds more like it because the code definately closes them, however I've 
found a workaround - the webview has a .html poperty so I just write direct to 
that and bypass the file which was really old code back when I used the 
konqueror control.

Thanks.
> 
> I hope this helps
> Dimitris
> 
> On Tue, May 4, 2010 at 12:08 PM, richard terry <rterry at ...1946...>wrote:
> > This routine is called by my program, consecutively a large number of
> > times during an automated process:
> >
> > Public Sub Display_HTML(sHTML As String, wb As WebView, Optional prefix
> > As String = "html")
> >
> >  Dim wFile As File
> >  Dim sFilename As String
> >
> >  sFilename = Temp$(prefix) & ".html"
> >  wfile = Open sFilename For Write Create
> >  Print #wfile, sHTML
> >  Close #wfile
> >  wb.url = sFilename
> > End
> >
> > the temp file is opened-closed.
> >
> > Yet at a certain point gambas comes up with an error 24: too many opened
> > files.
> > Does this mean the temp-file quota has somehow been exceeded?
> >
> > It makes no difference if I put in a fixed name like this:
> >
> > sfilename = "/home/richard/temp.html"
> >
> > Same result > it eventually bugs out. and complains
> > Regards
> >
> > Richard
> >
> >
> >
> > -------------------------------------------------------------------------
> >----- _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
> ---------------------------------------------------------------------------
> --- _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list