> > I think the key issue is:
> > No matter how convoluted you make the structure, to avoid having a
> > "getter" method in the qtObject, you will either wrap the
> slider-code
> > inside the main qtObject, or accept passing data from one object and
> > to another at some point.
>
> yes. how indeed do you have these objects function reasonably and
> efficiently unless they can communicate?
>

Quick interjection...

I don't think the issue is whether objects can pass data or not... Surely
they must otherwise there would be no communication between any of your
objects. I think the issue is should they pass private data to another
object via a getter method.

Example:

Object "A" might request some data from object "B" in order to complete a
task:

  -- Object "A"'s request
  importantDataIneedToDoSomething = objectB.getData

Object "B" obliges by returning it's private data:

on getData me

  return pPrivateData

end

Some people argue that this is perfectly acceptable because you have not
tried to access the private data directly (i.e.: objectA.pPrivateData) but
instead used a getter method to access it. But what's the difference? You
are simply making private data public. The question then becomes "Why does
object "A" need this data?". You have not done complete object
encapsulation. Instead keep your object's private data private and move the
task needed into object "A" or redesign your objects so that this does not
happen.

Gotta go... Got a jam session lined up tonight

ck



[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!]

Reply via email to