[DUG] Compnent creation question
Robert martin
rob at chreos.co.nz
Wed Oct 15 17:06:52 NZDT 2008
Sounds likely. I am calling it BEFORE inherited destroy.
Paul Heinz wrote:
> Rob asked:
>
>
>> Same error.
>>
>> Further info. The error is now showing 'Control 'CB' has no parent'
>> where CB is the name of the combobox. manually freeing the combobox
>> using a button and a .free works perfectly (all objects are
>> freed and no
>> erros).
>>
>
> At a guess, from memory, I think the Combo Items are managed a TStrings
> wrapper class which synchronises with the internal items list of the
> Micrsoft COMBO control builtin.
>
> So, the TStrings layer is sending delete notifications, and it might be
> attempting to send the necessary Window messages to the backing COMBO.
>
> But, since the TCombo box is currently a partially destroyed zombie
> control, it might end up causing Delphi to attempt to recreate it (i.e.
> to get a window Handle for the message)
>
> In the process of recreating the zombie, it might thus complains about
> missing Parents, which is a Window handle related concern.
>
> Now, this is all just a grand theory
> (well, hypothesis to be pedantic i.e. I pulled it out of my ...)
>
> So are you calling your new code _before_ or _after_ the call to the
> inherited in the destructor?
>
> TTFN,
> Paul.
>
>
>
>
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at delphi.org.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at delphi.org.nz with Subject: unsubscribe
>
>
More information about the Delphi
mailing list