Re: [gtkmm] Widget* get_nth_page (int page_number) doesn't work here
- From: Bart Hakvoort <bart hakvoort castel nl>
- To: joey yandle <jwy divisionbyzero com>
- Cc: Daniel <dss home se>, gtkmm-list gnome org
- Subject: Re: [gtkmm] Widget* get_nth_page (int page_number) doesn't work here
- Date: 10 Oct 2002 22:40:29 +0200
typecasting was the solution!! tnks guys :-)
On Thu, 2002-10-10 at 00:39, joey yandle wrote:
> >
> > 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]