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

List:       kde-devel
Subject:    Re: how to connect to DCOP signal from kded/mediamanager?
From:       Thomas =?utf-8?q?L=C3=BCbking?= <thomas.luebking () web ! de>
Date:       2005-05-15 19:30:03
Message-ID: 200505152130.04174.thomas.luebking () web ! de
[Download RAW message or body]

On Sunday, 15. May 2005 20:48, Matthias Welwarsky wrote:
> > // my code:
> > client = KApplication::dcopClient();
> > client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(QString)",
> > "BaghiraSidebarIface", "mediumAdded(QString)", FALSE);
>
> I have the following code in my test application, before the
> MediaManagerProxy becomes instantiated:
>
> 	if (!kapp->dcopClient()->isAttached()) {
> 		kapp->dcopClient()->attach();
> 	}
>
> Would this be sufficient?
if you sure that you call the connect from the proper dcop client and using 
the proper dcop object: NO ;)
you /need/ to register the client if it's not.
if you're e.g. writing a plugin for konqueror, the client is attached and 
registered, but if you're on your own application, you must register the 
client: kapp->dcopClient()->registerAs("whatever"); (you can query the 
registration state with isRegistered())

Thomas
-- 
Think, think different. But essentially: Think!
 
>> 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