Nikolai Pretzell wrote:

> I'd however like to establish a rule that classes/functions taking a
> pointer to (possibly) not fully constructed classes have a comment that
> explicitely allows that - assuming that everywhere else it is a bug.

Is a cast to the base class when passing "this" enough? Something like

aControllElement((Window*)this, MyRedId )

instead of the current

aControllElement(this, MyRedId )

though I consider this to be superfluous in case of VCL Windows because
*they work this way*. Why commenting something that works as designed?

Here I would see it from the other side: the ctor implementation of
"aControlElement" had a serious bug if it would call any virtual methods
on the "parent" pointer it gets passed in.

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to