Re: Why Gtk::Builder::get_widget(_derived) returns void?
- From: Deng Xiyue <manphiz gmail com>
- To: gtkmm-list gnome org
- Subject: Re: Why Gtk::Builder::get_widget(_derived) returns void?
- Date: Mon, 27 Apr 2009 19:45:34 +0800
On Fri, Apr 24, 2009 at 02:01:54PM +0200, Murray Cumming wrote:
> On Thu, 2009-04-23 at 22:31 +0200, Krzesimir Nowak wrote:
> > Well, question is asked in topic.
> >
> > In libglademm such methods of Glade::Xml return a pointer to widget we
> > are getting from glade file. Which was neat, because it could be used in
> > constructor's initializer list.
>
> I guess I thought it was confusing to have the same thing returned as
> the result and via an output parameter, and I preferred having an output
> parameter to avoid using the callthis<WithThisType>() syntax that would
> be unfamiliar to many people.
>
However I found "get_widget<Type>()" syntax concise and typesafe, and
simplifies code so that one won't need to set up a NULL pointer
beforehand. Recently there is a discussion on gtk-devel-list that
discussing the same issue in C getter/setter API, and some people do
feel a getter returning void not satisfying.
Just my two cents :)
Regards,
Deng Xiyue
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]