[PyKDE] Keeping DCOP object reference does not work

Jim Bublitz jbublitz at nwinternet.com
Fri Oct 13 00:06:55 BST 2006


On Wednesday 11 October 2006 01:40, Krzysztof Lichota wrote:
> 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

The PyKDE version is a little old, and there have been dcop extension changes 
since the version you have, but I'm not sure they affect the problem you're 
having.

Could you provide a short example program that demonstrates the problem, so 
that I'm sure I'm troubleshooting the actual problem you're having? You can 
just post it as an attachment here,  or email it to me (or both).

Jim




More information about the PyQt mailing list