Hi, i thought about creating a simple Question function, wich gets a question 
and a explanation passed and returns a bool
However the function seems to return true always and only the first cout << 
appears in the console, so I gues the whole switch is not executed and maybee 
the run() not as well.

However this compiles fine without errors (Visual Studio 2008 Express Edition)


bool Updater::AreyouSure(string question,string explanation){
        cout << "Question " << question << " " << explanation << " \n";
        Gtk::MessageDialog 
questiondialog(question,false,MESSAGE_ERROR,BUTTONS_YES_NO,true);
        questiondialog.set_secondary_text(explanation);
        int result = questiondialog.run();
        //Handle the response:
        switch(result){
                case(Gtk::RESPONSE_OK):{
                        cout << red << "RESPONSE_OK" << "\n";
                        return true;
                        break;
                }
                case(Gtk::RESPONSE_CANCEL):{
                        cout << red << "RESPONSE_CANCEL" << "\n";
                        return false;
                        break;
                }
                default:{
                        cout << red << "default" << "\n";
                        return false;
                        break;
                }
        }
        cout << red << "end" << "\n";
}


      
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to