Fwd: Cannot `dynamic_cast` custom wrapped widget from Gtk::Builder




---------- Forwarded message ---------
From: Daniel Boles <dboles src gmail com>
Date: Fri, 1 May 2020, 22:31
Subject: Re: Cannot `dynamic_cast` custom wrapped widget from Gtk::Builder
To: Josh Bialkowski <josh bialkowski gmail com>




On Fri, 1 May 2020, 22:29 Josh Bialkowski via gtkmm-list, <gtkmm-list gnome org> wrote:

Everything compiles, but when I change the above code to:

~~~
Gtk::PanZoomArea panzoom_;
builder->get_widget("overhead-view", panzoom_)

~~~

the member is assigned nullptr and I see the following errors printed to stderr:

~~~
: CRITICAL **: 13:53:12.873: Gtk::Builder::get_widget(): dynamic_cast<> failed.
~~~


Did you miss an asterisk in that declaration? get_widget() wants a pointer as argument.



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