Re: [gtkmm] Widget* get_nth_page (int page_number) doesn't work here
- From: joey yandle <jwy divisionbyzero com>
- To: Daniel <dss home se>
- Cc: Bart Hakvoort <bart hakvoort castel nl>, <gtkmm-list gnome org>
- Subject: Re: [gtkmm] Widget* get_nth_page (int page_number) doesn't work here
- Date: Wed, 9 Oct 2002 15:39:03 -0700 (PDT)
>
> or maybe a little more correct?
>
> Gtk::Button *b = static_cast<Gtk::Button*>(days->get_nth_page(0));
>
> Don't know if static_cast is the appropriate *_cast to use...
>
Since you're casting from a base class (Gtk::Widget) to a child
class (Gtk::Button), you should use dynamic_cast<>. This has
the benefit of returning 0 if the cast fails.
cheers,
--
If video games really affected kids, we'd all be running around in dark
rooms, munching on pills, and listening to electronic music.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]