[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Questions about KDCOPActionProxy...
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-09-28 13:59:17
[Download RAW message or body]

On Vendredi 28 Septembre 2001 15:47, ian reinhart geiser wrote:
> Greetings,
> 	I have trying to improve the scripting support in KDE 3, but it seems that
> very few have been fans of my plan of attack.  I ran acrross
> KDCOPActionProxy...  It looks like it will do most of what I would like to do
> but I cannot find any apps that are using it. 

Not apps, but scripts.
Any script trying to activate actions uses this proxy.
Check out the automation paper (newly announced on the dot), there are a few examples in there.

> I have been doing some MacApp development lately and have noticed some
> similarites between DCOP and Applescripts Apple Events.   IMHO DCOP is a
> cleaner approach, but it is more effort to add to existing applications.
> 
> The end goal here is to make dcop implementations in KDE more consistant. 
Sounds good.

> I think DCOP is one of the better solutions out there, but it's implementation
> amongst KDE applications is spotty.  I mean look at the difference in DCOP
> handles between KWrite and KOrganizer... There are dcop calls that do the
> same thing but are called different names.  I think making additions to the
> KApp or KMainWindow are the best ways to go.  This will allow consistant
> features to be delivered across all KDE applications.

This looks a bit like what I did to kofficecore (check out KoApplicationIface, 
KoDocumentIface, KoViewIface and KoMainWindowIface).

I agree that support for this in KMainWindow would be a very good idea.
Especially now that all actions get registered there (in the mainwindow's accel),
we could offer direct access to all actions in the app from there
(which would solve the problem that currently, in koffice, the shell's, the doc's and
the view's actions are in separate lists (action collections)).
But they all get plugged into the same mainwindow, so it'd be a good idea to
access them from there.

> My other solution was to add DCOP interfaces to KStdAction but I was told
> this was a poor solution....

Quite limiting, if only _standard_ actions are accessible.

Anyway, actions is only the first step. As someone pointed out on koffice@, if
an action triggers a dialog, then that's not what the script wants. It wants a
similar functionality, but sending parameters instead of getting a dialog.
(The example was, inserting a table in kword, which brings up a dialog asking for
the number of rows and columns). I see no generic solution for this, this has to
be defined as application-specific dcop interfaces.....

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic