Board index » cppbuilder » Weirdness with a TFrame derived control instantiated dynamically..

Weirdness with a TFrame derived control instantiated dynamically..

I'm not sure if it's clear, but I'm getting the message in the TFrame
constructor, before I have a chance to even set the parent....
 

Re:Weirdness with a TFrame derived control instantiated dynamically..


I switched runtime packages OFF, linking statically to the other libraries I
need.  Now the component is working as it was before, and I can also step
into vcl code.  BUT, RTTI doesn't appear to be working anymore.
dyanamic_cast is returning NULL in cases where I KNOW the object is the
right type.

Argh.
<snip>

Re:Weirdness with a TFrame derived control instantiated dynamically..


Such an error usually means that you are accessing some aspect of a child
component inside your constructor which requires the Parent to be assigned
first, but the Parent is not assigned until after the constructor finishes.
What does your actual constructor code look like?

Gambit

Quote
"Sean Hoffman" <seanhoffdontspa...@earthlink.net> wrote in message

news:3e1588d7$1@newsgroups.borland.com...
Quote
> I've tried constructing one via both available constructors, the
> one which takes a HWND ParentWindow and the other which
> takes TComponent Owner; and in both cases I'm getting an
> exception "Control has no parent window" exception.

Other Threads