Re: Casting with Gtk::VariantBase::cast_dynamic



On Mon, 2011-03-28 at 12:25 +0300, Povietkin Konstantin wrote:
> What is the difference between casting of 
> Glib::Variant< Glib::ustring >.get_type( ).get_string( ) = "s"
> and 
> Glib::Variant< Glib::ustring >.get_type( ).get_string( ) = "o"
> In my mind both are strings.

Yes, that seems reasonable, and it maps well to the C API's
get_string().

> When type is "s" Gtk::VariantBase::cast_dynamic does without error,
> when type is "o" throws std::bad_cast.

Does this commit help? 
http://git.gnome.org/browse/glibmm/commit/?id=3851639d919a9f779171648b7cbb8d1e74307204

I hope you can build from git to test that.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



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