At 23:28 +0200 2001_08_14, Brennan Young wrote:

I just read the article.
A very interesting discussion, if this holds water, then it 
definitely rocks my OOP-boat.
It appears, that his dogma could also be described as "never pass 
data between objects".
I suspect that he is somehow beating around the bush, and avoids 
mentioning the levels at which data will necessarily start flowing 
between objects. His "let the textObject do its own rendering into 
the passed window"... how will the textObject tell the window what to 
render, if data isn't passed to the WindowObject???

>  > I was thinking about the slider/qt thing last night, and realised that QT
>>  has a slider object as a child (the 'show controller' button) whereas I had
>>  been thinking in terms of the inheritance working the other way around...

"Is" the slider a QT object?
I think not, and then you shouldn't have inheritance.
There can exist an "aggregate" relation between the objects, in this 
case it would make sense to say that the QtObject "can" have a slider.
I think that maybe the aggregate object is significant in relation to 
"the level" at which data can start flowing.
Is it OK to let data flow between subObjects of the same aggregate metaObject?
In which case, it wouldn't make sense to prohibit the qtObject and 
the slider to exchange data.?

>Well what about behaviors? Do they inherit the sprite, or is it the other
>way round?

The sprite inherits from multiple behaviors. This is AFAIK the *only* 
place in Lingo, where we have "multiple inheritance". The weakness of 
the model, is that we cannot subclass the sprite, and override events 
from the score.
Bad!

>  > Anyway, I ended up unable to decide how to put the 'code family tree'
>>  together as a result... which should inherit which? Is this a common
>>  problem? <g>
>
>YES!

And often inheritance is not the right answer.

jakob

[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