I am creating a slide show viewer of where a user can select multiple files to 
show.

I built the loader to take in all of the file names into an array and then the 
rest of the program will cycle through the list and load/destroy the images and 
show them.

But while going through I found that only one image location is being put into 
the whole list and I cannot figure out why.

Here is relevant code:

void cb_main_load_multi(Fl_Widget*,void*)
{
        Fl_File_Chooser choice(".", "*.jpg\t", Fl_File_Chooser::MULTI, "Select 
JPEG Files");
        choice.show();
        while(choice.shown())
                Fl::wait();
        if(!choice.value())
                return;
        if(list)
        {
                for(int i = 0; i < frames_total; ++i)
                        delete list[i];
      delete [] list;
        }
        frames_total = choice.count();
        list = new const char*[frames_total];
        for(int i = 0; i < frames_total; i++)
      list[i] = new char[MAX_CHAR];
   for (int i = 0; i < frames_total; i++)
        {
        list[i] = choice.value(i+1);
   }
}

is there anything specific that I did wrong?

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to