[gtkmm] some help needed for a standard process


I need some help with my Gtk::FileSelection:
The FileSelection window (derived from Gtk::FileSelection)
is started with run() in the ctor.

When a selected file is not ok, I want to close
the displayed window and show a new FileSelection
window. I want to do this until the user selected
a valid file.

However, the window object I delete is still displayed
and I get many windows! :-(
Any idea?

  // I want to display the FileSelection window
  // until the selected file is ok
  string dataBaseFile;
  while (dataBaseFile.length() == 0) {
	// Display window for file selection
	FileSelection *fileSel = new FileSelection(string("select file:"));
	dataBaseFile = fileSel->getSelectedFile(); // returns "" if file is not valid
	fileSel->response(Gtk::RESPONSE_OK); // has no effect
	delete fileSel;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]