Re: [gtk-list] Re: scrollbars and signals



On Fri, 30 Jan 1998, Nathan Froyd wrote:

[On the subject of Adjustments]

> Hmmm. Why doesn't the scrollbar have the values associated with itself?
> It doesn't seems like very good design (at least to me ;) ) to have a
> scrollbar be associated with a particular adjustment. If GTK+ is OO, I
> feel (note that I am not experienced in OO design) that the scrollbar
> should be autonomous of a certain 'adjustment'. For example, in C++
> (this may be in gtk--, I dunno), you would just have the virtual base
> class GtkRange or whatever and then have the GtkScrollbar and GtkSlider
> (don't remember the names) inherit the attributes of the parent.
> Obviously, C doesn't have situations like this in mind, but that's just
> my $0.02. :)

Uh? How does this let me connect a Scrollbar and a slider together?
Now I would have to write loads of "look in the scrollbar, put the
value in the slider" and "look in the slider, put the value in the
scrollbar" code. And the code which cares about the value elsewhere
must know which I have used, a slider or a scrollbar... Arrrgh!

I think a few extra lines of code here and there are not much to pay
for the advantages of the current design.

Nick.



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