On Sat, 2011-02-26 at 02:14 +0100, Chris Kühl wrote:
> In case you haven't figured it out, here is some code that seems to work.
[snip]
Well done.
> // This must be called first to initialize type.
> Glib::RefPtr<MyRect> myRect = MyRect::create();
We really should find a way to avoid that.
[snip]
> // Get the stage by name, casting it to the correct C++-type.
> const Glib::RefPtr<Clutter::Stage> stage =
> Glib::RefPtr<Clutter::Stage>::cast_static(script->get_object("stage"));
A cast_dyanmic<>, with an if() check, would be generally safer. That's
what we generally use with Gtk::Builder::get_widget() too.
In fact, a get_object("stage", stage) method might be nicest, analogous
to Gtk::Builder::get_widget("widgetname", widget).
[snip]
--
[email protected]
www.murrayc.com
www.openismus.com
_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list