Re: Doubts creating new Objects
- From: Jaka Mocnik <jaka mocnik kiss uni-lj si>
- To: Manuel Clos <llanero jazzfree com>
- CC: gnome-devel-list gnome org
- Subject: Re: Doubts creating new Objects
- Date: Thu, 30 Mar 2000 12:25:06 +0200
Manuel Clos wrote:
> I can solve it doing:
>
> (GnomeMDI *)app = gnome_mdi_new(appname, title);
>
> but it look ugly, and I don't know if it's the Right Way (tm).
you could cast the return of gnome_mdi_new() to ControlApp*.
> Also, is this the correct place to do the gnome_mdi_new or should
> it go in the init function of the new object.
probably better in init().
> >From now on, I must cast the new object everytime I do something
> like this:
>
> gnome_mdi_set_menubar_template(GNOME_MDI(mdi), main_menu);
> gnome_mdi_set_toolbar_template(GNOME_MDI(mdi), main_toolbar);
> gnome_mdi_add_child (GNOME_MDI(mdi), GNOME_MDI_CHILD (page));
> GNOME_MDI(mdi)->active_view
>
> so, is there an extra work? or the cast won't affect perfomance?.
effect on the performance depends on the debugging settings.
> NewObject->ParentObject
>
> So I can do:
>
> gnome_mdi_add_child (MyMDI->mdi, GNOME_MDI_CHILD (page));
> GNOME_MDI(MyMDI->mdi)->active_view
>
> I would love to hear why this is bad!.
why would it be bad?
regards,
jaKa
--
email: jaka.mocnik@kiss.uni-lj.si
w3: http://pluton.ijs.si/~jaka
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]