From pykde Thu Aug 24 23:14:38 2006 From: Danny Pansters Date: Thu, 24 Aug 2006 23:14:38 +0000 To: pykde Subject: Re: [PyKDE] Cannot use KUniqueApplication with dcop Message-Id: <200608250114.39057.danny () ricin ! com> X-MARC-Message: https://marc.info/?l=pykde&m=115646142618043 On Thursday 24 August 2006 09:26, Sebastian Kügler wrote: > On Thursday 24 August 2006 01:53, Danny Pansters wrote: > > On Wednesday 23 August 2006 23:58, Sebastian Kügler wrote: > > > I'm trying to make a KUniqueApplication accessible via dcop, but I'm > > > getting the following error: > > > > > > dcop-testapp: ERROR: Communication problem with dcop-testapp, it > > > probably crashed. > > > > > > If I change KUniqueApplication to KApplication, it works just fine. > > > Does anyone know what's going on here? How can I debug this further? > > > > > > Attached small program illustrates the problem (It's mostly the same as > > > in my previous post). > > > > When I used KUniqueApplication I used somewhat different methods for the > > appdata than you do, not all mentioned in the API may be supported by > > py-kde. That may be a lead. > > Could you dig those up for me? Sure, I use this, copy/pasted: aboutdata = KAboutData(KBTV_UNIQUENAME, KBTV_FANCYNAME, KBTV_VERSION, KBTV_DESCRIPTION, KAboutData.License_BSD, KBTV_COPYRIGHT) aboutdata.addAuthor(KBTV_AUTHOR, "Author and maintainer", KBTV_AUTHOR_EMAIL) aboutdata.setBugAddress(KBTV_AUTHOR_EMAIL) KCmdLineArgs.init(sys.argv, aboutdata) app = KUniqueApplication(True, True, False) And later on: dcopif = KbtvDCOPExObj(mainwindow, KBTV_FANCYNAME) (mainwindow is a kpart) All KBTV_* constants are (python) strings, I don't use None anywhere. I know there's several ways to put together the appdata and remember having to tweak this when I added dcop (service only), and then decided that it made sense for a TV app to be a KUniqueApp. HTH, Dan > > But the thing that stands out is that you never show() your mainwindow. > > It may be implied by KApp but not by KUniqueApp (as this may already have > > an instance running). Just a thought... > > It shouldn't be necessary (the testapp does not really have a mainWindow). > In my "real application", I'm showing it at a later point (it's a systray > app), that's where I got the error from. The attached code is just a > minimal example. _______________________________________________ PyKDE mailing list PyKDE@mats.imk.fraunhofer.de http://mats.imk.fraunhofer.de/mailman/listinfo/pykde