Casting Glib::RefPtr
- From: "Germán Diago" <germandiago gmail com>
- To: gtkmm-list gnome org
- Subject: Casting Glib::RefPtr
- Date: Sat, 25 Oct 2008 17:17:51 +0200
Hello. This piece of code doesn't compile:
Glib::RefPtr<Gtk::Builder> b = Gtk::Builder::create_from_file("prueba.ui");
Gtk::Window * w;
Gtk::TreeView * view;
Glib::RefPtr<Glib::Object> liststore;
b->get_widget("window1", w);
//Glib::RefPtr<Glib::Object>::cast_static<Gtk::ListStore>(b->get_object("liststore"));
Glib::RefPtr<Glib::Object> o = b->get_object("liststore");
//This line is the one that does not compile
Glib::RefPtr<Glib::Object>::cast_static<Gtk::ListStore>(o);
I want to cast to a liststore an object in the last line, but I can't.
Which is the correct way to do it?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]