Maurice Batey wrote:
> By the way, have you been able to operate a KDialog '--progressbar' ?
>
> (I can get the initial KDialog 'Initialising x' window up, but cannot find
> a way to use 'dcop' to update it.)
I never tried before and I'm unable to. Below what I tried.
If Rony is reading this, maybe he can tell what goes wrong.
Cheers, Uli
------------------------------------------
How to talk to the progessbar process that runs concurrently to the rexx
script ? A problem not for the rexx interpreter to solve but rather for KDE.
Google hints that KDE4 uses dbus (and KDE3 dcop) for this task.
In order to talk to some service on the dbus, one need its address; that
address is assigned when the service is created, so one must recover the
reply when launching the progress bar:
'kdialog --title "DCOP Progress" --progressbar "Initializing . . ." 2 |
rxqueue';pull reply;say reply
ORG.KDE.KDIALOG-29179 /PROGRESSDIALOG
Then to talk on the dbus there is /usr/bin/qdbus which comes in package
libqt4. But when I then try to talk to this progressdialog it doesn't work:
'qdbus' reply 'org.kde.kdialog.ProgressDialog.setLabelText "Step 1" '
Cannot find 'org.kde.kdialog.ProgressDialog.setLabelText' in object
/PROGRESSDIALOG at ORG.KDE.KDIALOG-29179
. rc = 1
'qdbus' reply 'Set org.kde.kdialog.ProgressDialog value 1'
Cannot find '.Set' in object /PROGRESSDIALOG at ORG.KDE.KDIALOG-29179
. rc = 1
However the progressdialog still lives and methods/properties can be queried
from another rexx program runnning in another console:
'qdbus org.kde.kdialog-29179 /ProgressDialog'
property readwrite bool org.kde.kdialog.ProgressDialog.autoClose
property readwrite int org.kde.kdialog.ProgressDialog.maximum
property readwrite int org.kde.kdialog.ProgressDialog.value
method void org.kde.kdialog.ProgressDialog.close()
method void org.kde.kdialog.ProgressDialog.setLabelText(QString label)
method void org.kde.kdialog.ProgressDialog.showCancelButton(bool value)
method bool org.kde.kdialog.ProgressDialog.wasCancelled()
method QDBusVariant org.freedesktop.DBus.Properties.Get(QString
interface_name, QString property_name)
method QVariantMap org.freedesktop.DBus.Properties.GetAll(QString
interface_name)
method void org.freedesktop.DBus.Properties.Set(QString interface_name,
QString property_name, QDBusVariant value)
method QString org.freedesktop.DBus.Introspectable.Introspect()
method QString org.freedesktop.DBus.Peer.GetMachineId()
method void org.freedesktop.DBus.Peer.Ping()