[Gambas-user] Anybody have an example using DCOP?
johnf
jfabiani at ...1109...
Tue Jan 10 18:10:48 CET 2006
On Tuesday 10 January 2006 01:29, ron wrote:
> On Tuesday 10 January 2006 04:22, johnf wrote:
> > On Monday 09 January 2006 19:11, johnf wrote:
> > > Hi,
> > > I did not find an example of using DCOP anywhere (or am I just missing
> > > it). I'd like to run kword.
> > >
> > > Thanks
> > > John
> >
> > Ok I just found kate (I did not know what kate was until now because I
> > didn't notice it was on the list of demo's). But where can I find out
> > about the functions for kword - like the functions found in the kate
> > demo?
> >
> > John
>
> You can use 'kdcop' to see something, but how exactly to use and
> then with gambas is not pretty to find.
>
> For dcop main info you must go to developer.kde.org is my best guess
I have discovered that kdcop does not display anything with respect to
"kword". But I did find an old article describing how to use the dcop at the
command line. Later I'll provide a few commands for dcop.
But here is the basic issue. I need some sort of report writer that will
provide an invoice, and general reports. It has to work (or made to work)
with a result object. So I decided I would first check into the word
processors for Linux (OpenOffice and Kword). In the windows world working
with word processors is easy and I thought I could do the same with Linux.
But what I'm discovering is a real mess. Kword uses "dcop" and looks like it
might work. But kword has at least two issues:
1. It is not the current leader - OpenOffice is.
2. It is based on frames and not the standard text as other word processors.
3. (not sure this is right) It appears that dcop will be replaced with dbus.
OpenOffice also has several ways to be automated.
1. Use UNO - something I don't understand and find it hard to follow the
programming examples (mostly the C++ stuff).
2. Star basic - but again find little information - but it still looks like I
need to at least use some sort of UNO call to start the process.
3. There is something called URE that is a compiled and a run time version of
UNO. Again almost no information.
The problem that worries me the most is the issue of getting a wrapper into
Gambas for either UNO or URE.
So what do I do? That is the question! Anyone have a suggestion?
How to explore a dcop aware program:
The program you want to examine has to be running. I.e. kword. Then from
the command line:
#dcop
The above will list all the running dcop aware programs. You should see
something like
kword-23456
in the list of programs.
Then you can:
#dcop kword-23456
Which will provide a list of objects (objects might not be the best word)
within kword. Next you can try something like the following from the list of
items returned with above command.
#dcop kword-23456 qt
That appears to list more objects.
#dcop kword-23456 qt objects
That will provide a list of the 'QT-DCOP-Bridged' objects. These appear to be
the functions/procedures. How to use them is different question and I don't
know. My guess is you have to experiment (hit and miss) the hard way.
John
More information about the User
mailing list