[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: KParts::ReadOnlyPart in Java with KLibFactory: not possibile?!?
From:       Anatoli Gorchetchnikov <anatoli () cns ! bu ! edu>
Date:       2005-01-21 18:07:09
Message-ID: 200501211307.09989.anatoli () cns ! bu ! edu
[Download RAW message or body]

On Friday 21 January 2005 09:37, David Faure wrote:
> On Friday 21 January 2005 16:18, Mario Scalas wrote:
> > On Friday 21 January 2005 14:13, Anatoli Gorchetchnikov wrote:
> > > Might be smth like
> > >
> > > Part* part = dynamic_cast<Part*>(factory.create( this,
> > > "osgviewer_part", "KParts::ReadOnlyPart" ));
> >
> > May works C++ (I remember reading something about "dynamic_cast<> is evil
> > whi libs)
>
> It's fine with libs, it's evil with dlopened modules (due to us not using
> RTLD_GLOBAL).

Now I am confused... Parts are dlopened, aren't they? So having

m_project = dynamic_cast<KProject*>(factory->create(this, projectName, 
"KParts::ReadWritePart" ));

is bad? Then how do I get the pointer to my part in the main app if I need it 
to connect several custom signals/slots? (KProject is derived from 
KParts::ReadWritePart)

-- 
Regards,

Anatoli
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic