Brennan Young wrote:
> "Al Hospers" <[EMAIL PROTECTED]> wrote
>
> > so a slider function should only be passing the current slider knob
> > location as a % of the slide. thus it could be used for anything that
> > would use a slider, not just QT! OK, that's good.
>
> Perhaps not even a percentage. When the slider 'registers' to be a
> view/controller for an integer range in another object, it might also store
> the maximum (and minimum) values that it is going to represent. Internally,
> it might store that as a percentage, or more likely as a fraction of its
> entire width.
I'm with Al in trying understand how they do their jobs and communicate without
accessors.
Also if the slider is getting passed the maximum and minimum values isn't this
data that belongs to the QTobject? So why is the slider getting access to it? I
can understand the simple slider black box of one input one output. Input is a
percentage and so is output...
Wait I just had a thought... to make this system a little more complex and maybe
help understand the concepts better what if we introduce an interger entry field
into our group of objects. This field will keep a running update of the current
movie time and by entering a time into it the movie and slider will jump to the
given location. So now we need movie object, slider object and field object all
talking to each other.
As soon as I think about the field object I can see that simply passing out the
percentage from the movie object is not going to do us any good. Your suggestion
of min/max/current values as the passed information works well here. Each object
receives that data and does with it what it will in order to display properly.
The slider object can work out a percentage for display, or upon a change in the
slide use its position and the min max values to return the current value. The
field object can simply display the current value when it is passed to it and
store the min max values so that when an entry is made that is beyond those
values it can trap the entry reset it to the limit and then pass the appropriate
current time back.
Now my other questions are:
-Should the min max be passed with the current value each time?
-Is having the qt object pass the min max better than having the other objects
request them? Is one approach better object design than the other?
Is the passing of information approach considered to be objects without
accessors?
-Is it better to have these objects simply register themselves with the qt
object as other objects or would ancestory work better here with the qt object
being the ancestor to each of the input/output devices?
-With the qt object either being a manager or an ancestor then when one of the
input devices sends new data to the qt object it can be in charge of sending
updates to all its input/output devices and that way the i/o devices are not
dependant on each other or how many etc. Yes? No?
that's all for now, too early in the morning to think of much more.
Rob
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]