On 16 Jul 2011, at 17:12, Greg Ercolano wrote: > On 07/16/11 00:42, Carlos Luna wrote: >> >> Ok, here“s some example code showing the situation. > > I'd suggest trying a few things. > > First: Try adding some fopen() calls to test if you can > access the files with normal operating system calls using > the same filenames you're passing to Fl_PNG_Image for the > situations where you are encountering problems, eg:
Meh, I'd favour access() or stat() over trying to fopen() the files, as then there's no need remember to close them before trying to open them again... > > If you /don't/ get any alerts, then the FLTK folks might > need to look into this further, in which case as you say, > it might be a problem in the lib. As I said, I tried a few variants of this on Friday on one of the XP boxes we have at work (no XP box to test on at home now...), and could not reproduce the effect - though this was before the OP posted his code fragment so I was using hacky code of my own creation. That said, looking at his code, it's not obvious to me that what I was doing was substantively different, other than not making use of the OpDesk stuff... > > ALSO: perhaps it's no longer needed, but I thought FLTK apps > that used the FLTK image library had to call: > > fl_register_images(); > > ..at the top of main() to ensure the lib properly initialized. > So you should try adding that as the first thing in your main(). AFAIK that is still required, and I certainly did it in my tests, so it may be key. I didn't think the code would even run if you hadn't registered the image libs, though... I've never really tried that though! _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

