Re: [GnomeMeeting-devel-list] Comments on the coding rules in the wiki



> I would think that things should be created in a sane state, like this:
> object = gm_object_new (params...);
> without the need to do things like:
> object = gm_object_new ();
> gm_object_make_sane (object, params...);
> 
> Could you make your point clearer?
> 

Your point makes sense. Now let's take another example:
object = gm_prefs_window_new ();
gm_prefs_window_update_codecs_list (object, PStringList codecs);

Both make sense. Probably there should be no rule for that, except
"common sense".

> > I'm a bit confused about that one. For example, I create the prefs
> > window in GnomeMeeting::BuildGUI, but where should I initialize the list
> > of available devices and available codecs? In BuildGUI right after the
> > creation or in the EndPoint initialization? I consider it should be put
> > in its initial state just right after the creation. Only the menus can
> > be put in their initial state during the creation, because it is more
> > convenient ;)
> 
> I must admit that I'm a bit confused by GnomeMeeting::GnomeMeeting and
> GnomeMeeting::BuildGUI ; in my opinion, the latter should disappear, and
> the former should do all the work.
> 

I don't like to put too many things in the constructor. I usually only
add variable declarations. That's why you have BuildGUI to init the GUI
and Init to init the rest, ie the endpoint in the case of GnomeMeeting.

> Snark
> 
> _______________________________________________
> Gnomemeeting-devel-list mailing list
> Gnomemeeting-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnomemeeting-devel-list

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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