Re: [PyKDE] ANN: SIP/PyQt v3.5 QScintilla v0.3 Released
Am Fre, 2002-12-13 um 02.11 schrieb Phil Thompson: Could you give me a hint how to wrap QCopEnvelope? I need it for our project since calling /opt/QtPalmtop/bin/qcop is way to slow. [...] I have wrapped QCopEnvelope with success. There shouldn't be any problem implementing the operator by providing an __lshift__ method in the same way that __iadd__ is implemented for QSemaphore. I overlooked that QCopEnvelope is derived from QDataStream. QDataStream doesn't implement the and operators, but provides writeBytes(), which should be sufficient... if there wasn't a problem concerning the data bytes. One example: Sending a QCOP message without parameters works very good, e.g. the following code make an hourglass appear on the taskbar (del e is neccessary, because the QCopEnvelope sends its message in the C++ destructor): e = qtpe.QCopEnvelope( QPE/System, busy() ) del e Very good. Sending a QCOP message with parameters also works fine, when the receiver is PyQt, e.g. e = qtpe.QCopEnvelope( QPE/Application/elan, message() ) e.writeBytes( HelloWorld! ) del e works also as expected. Now the case which does not function: The following code _should_ make a string appear on the TaskBar (it's basically the same what Global::statusMessage() does): e = qtpe.QCopEnvelope( QPE/TaskBar, message(QString) ) e.writeBytes( HelloWorld! ) del e But the only thing I get is garbage on the taskbar. The message seems to be received, but somehow the data is not marshalled or interpretated correctly. Or could it be possible (since the message is sent inside the destructor) that the corresponding char* has been deleted or overwritten before it is accessed by the QCopEnvelope? Yours, -- :M: -- Dipl.-Inf. Michael 'Mickey' Lauer [EMAIL PROTECTED] Raum 10b - ++49 69 798 28358 Fachbereich Informatik und Biologie -- ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: SIP/PyQt v3.5 QScintilla v0.3 Released
On Friday 13 December 2002 2:53 pm, Michael Lauer wrote: Am Fre, 2002-12-13 um 02.11 schrieb Phil Thompson: Could you give me a hint how to wrap QCopEnvelope? I need it for our project since calling /opt/QtPalmtop/bin/qcop is way to slow. [...] I have wrapped QCopEnvelope with success. There shouldn't be any problem implementing the operator by providing an __lshift__ method in the same way that __iadd__ is implemented for QSemaphore. I overlooked that QCopEnvelope is derived from QDataStream. QDataStream doesn't implement the and operators, but provides writeBytes(), which should be sufficient... if there wasn't a problem concerning the data bytes. One example: Sending a QCOP message without parameters works very good, e.g. the following code make an hourglass appear on the taskbar (del e is neccessary, because the QCopEnvelope sends its message in the C++ destructor): e = qtpe.QCopEnvelope( QPE/System, busy() ) del e Very good. Sending a QCOP message with parameters also works fine, when the receiver is PyQt, e.g. e = qtpe.QCopEnvelope( QPE/Application/elan, message() ) e.writeBytes( HelloWorld! ) del e works also as expected. Now the case which does not function: The following code _should_ make a string appear on the TaskBar (it's basically the same what Global::statusMessage() does): e = qtpe.QCopEnvelope( QPE/TaskBar, message(QString) ) e.writeBytes( HelloWorld! ) del e But the only thing I get is garbage on the taskbar. The message seems to be received, but somehow the data is not marshalled or interpretated correctly. Or could it be possible (since the message is sent inside the destructor) that the corresponding char* has been deleted or overwritten before it is accessed by the QCopEnvelope? Shouldn't the following prove if it's being deleted/overwritten? s = Hello World! e = qtpe.QCopEnvelope( QPE/TaskBar, message(QString) ) e.writeBytes(s) del e Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde
Re: [PyKDE] ANN: SIP/PyQt v3.5 QScintilla v0.3 Released
On Friday 13 December 2002 12:00 am, Michael Lauer wrote: Phil, congratulations for this new release! I'm especially happy that the enhanced Qtopia support has made it into this release. One thing though (ya' know, some folks just can't get enough :)): Could you give me a hint how to wrap QCopEnvelope? I need it for our project since calling /opt/QtPalmtop/bin/qcop is way to slow. The issue came up on this list, once, and IIRC the problem was the support for the operator which QCopEnvelope relies on. Would it be difficult to implement QCopEnvelope using a simple class method, e.g. QCopEnvelope.post instead of the operator? There shouldn't be any problem implementing the operator by providing an __lshift__ method in the same way that __iadd__ is implemented for QSemaphore. Phil ___ PyKDE mailing list[EMAIL PROTECTED] http://mats.gmd.de/mailman/listinfo/pykde