[interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Thu, 18 Dec 2003 20:14:35 +0100 CET
"burton666@xxxxxxxxx" <burton666@xxxxxxxxx> wrote:
> > I would guess that _fini_interface() is only called on termination
> > of
> > the app, right? In that case, you probably wouldn't have to delete
> > anything.
> Yeah, that's my guess too. But I tought that explicitly deleting what
> I
> allocated in init_interface_kit() was a bit cleaner.
Definitely! Since you're calling _init_interface_kit() in some kind of
BApplication initialization, you should probably call
_fini_interface_kit() in the BApplication destructor.
> > BTW in my headers, _fini_interface() is friend of BTextView, and so
> > should be able to delete what it has to - why can't we just do
> > that,
> > too?
> Add _fini_interface_kit() as friend, you mean ? Yeah, we could do
> that too.
That would be the cleanest solution in my opinion.
> > _fini_interface_kit() is exported from InterfaceDefs.h and friend
> > of
> > BRadioButton as well in the Dano headers.
> And BMenu, etc.
> BTW, we'll need to add it as friend of BScrollBar as well, since our
> Scrollbars
> are client side, and they'll need to be initialized by that function
> as well.
Could be a good idea, yes. OTOH it wouldn't be too complex to serialize
the global initialization in the BScrollBar constructor at first use.
Since scroll bars are often used, that's probably not really necessary,
though.
Bye,
Axel.
- References:
- [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- From: burton666@xxxxxxxxx
Other related posts:
- » [interfacekit] patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- » [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- [interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- From: burton666@xxxxxxxxx