[PyKDE] Keeping DCOP object reference does not work

Krzysztof Lichota krzysiek at lichota.net
Wed Oct 11 09:40:46 BST 2006


I have come across the following problem when using pyKDE: when I try
keeping dcopext.DCOPObj reference it does not work. Here is the code I use:

def initDcopObj(self):
    dcop = kdecore.KApplication.dcopClient()
    self.dcopObj = dcopext.DCOPObj(
        kdecore.KApplication.dcopClient().appId(),
        dcop,
        self.topLevelWidget().name()
        )

If I try to use it in slot called later like this:
ok, result = self.dcopObj.actionIsEnabled("copy")

then calls to methods fail (call returns (False, None)) and
introspection does not show method.

If I create instance right before calling DCOP method, it works.
I have noticed that also writing method which returns fresh DCOPObj
instance and using this instance does not work.

Any hints why it is working like that?

Versions (Kubuntu 6.06.1 with KDE 3.5.3):
python-kde3 3.15.1+snapshot20060118-0ubuntu1
python-qt3 3.15.1-0ubuntu3

Regards

	Krzysztof Lichota


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20061011/a9d955a9/signature.bin


More information about the PyQt mailing list