[Kstars-devel] KDE/kdeedu/kstars/kstars/skycomponents

Thomas Kabelmann thomas.kabelmann at gmx.de
Wed Oct 26 08:50:49 CEST 2005


Hi Jason,

you're right, only composites can be parents. But using a component pointer as 
parent makes it easier to code. Then we don't need to know about the 
composite class in the component class and can put all code in the component 
class. As I just want to use the parent pointer to send messages to the 
parent and that delegates it to it's parent, it's ok to use a component 
pointer. But perhaps we don't need a parent pointer. At this moment it's 
unused.

Cheers,
Thomas

Am Mittwoch, 26. Oktober 2005 06:53 schrieb Jason Harris:
> Hi Thomas,
>
> > Replaced in all ctors "SkyComposite *parent" by "SkyComponent *parent" as
> > it's obviously wrong. Was a thinko of me. I just didn't replaced ctors
> > with special parents like CometsComponent.
>
> I don't understand this.  I thought that only Composites can contain
> Components and sub-Composites?  In that case, shouldn't the parent be of
> type SkyComposite?
>
> Jason


More information about the Kstars-devel mailing list