Problem with Giomm



Hello!

When this code is executed (I removed irrelevant code):

    std::list <Glib::RefPtr <Gio::File>>            files_list;
    std::list <Glib::RefPtr <Gio::File>>::iterator  file_iter;
    Gtk::FileChooserDialog                         *tmp_dialog;

    this->get_widget ("files_chooser_dialog", tmp_dialog);
    files_list = tmp_dialog->get_files ();

    file_iter = files_list.begin ();
   
    do
    {
        try
        {
            Glib::RefPtr <Gio::FileInfo> file_info;

            // Get display name, size and icon
            file_info = (*file_iter)->query_info ("standard::display-name,standard::size,standard::ico", Gio::FILE_QUERY_INFO_NONE);
            //
        }
        catch (const Gio::Error &error)
        {
           
        }
       
        file_iter++;
    } while (file_iter != files_list.end ());

Program always fails with error:
Failed to wrap object of type 'GLocalFile'. Hint: this error is commonly caused by failing to call a library init() function.

However I Gio::init() and Glib::init() are one of the first functions executed in my program.

I thought, that it may be because I use unstable glibmm version (v2.21.3), this is because I work on Ubuntu 9.10 alpha....


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