[interfacekit] Re: patch for Globals.cpp: _init_interface_kit()
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: interfacekit@xxxxxxxxxxxxx
- Date: Fri, 19 Dec 2003 00:24:57 +0100
On 2003-12-18 at 13:45:32 [+0100], burton666@xxxxxxxxx wrote:
> > > 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.
> > Not necessary - our BScrollbars initialize themselves in the
> > constructor via get_scrollbar_info() and draw themselves appropriately.
> > Alternately, we could have a global scrollbar_info object to save time,
> > but, to be honest, I don't really see people needing to construct
> > BScrollBars in a rapid fashion.
> >
>
> Well, since get_scrollbar_info() is a remote method, so it's not so fast, I
> don't see the need to call it repeatedly. For example, in case of Tracker,
> you would have at least 2 calls to get_scrollbar_info every time a window
> is created (very often, then), in case you call it in the constructor,
> against just one call at the tracker startup, if you call it in
> _init_interface_kit().
Speed might not be an issue, but consistency is. When the user changes the
scrollbar style (I suppose that's what's stored in the info) either all
scrollbars of an app should change at once, or all should stick to the old
style as the app lives. But it should not happen that the scrollbars created
before have one style while the ones created after have another one. For
dynamic GUIs there would even be a good chance that one can see both in one
window. So, IMHO getting the info in the constructor is only OK when all
scrollbars are adjusted at once.
CU, Ingo
- 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