[Gambas-user] Interprocess communication....

sbungay sbungay at ...981...
Mon May 7 14:52:10 CEST 2007


   Thanks for the replies guys.
   Since sending that email I have been playing around with command-line 
dcop and I can control the application from bash so using the shell 
command should work. Process_read can capture the output DCOP sends to 
stdout, this can then be parsed to locate the instance of konqueror I 
want to use. Konqueror also has a KIOSK mode (about to start playing 
with that now), so when I embed it into a frame on a form it should look 
nice and clean.
   So I'll answer question #1.

1. (a)  Can GAMBAS use DCOP to talk to Kde Applications?
    (b)  If so How?

    (a) Yes, but not directly. You use the SHELL
        to get at applications through DCOP (KDE only). Use process_read
        to capture the output from DCOP.

    (b) For example;

        shell "dcop"

    Would return a list of all running applications that use dcop for 
their interprocess communication. Lets say it returns the following;

    konqueror-4400
    kmix
    kookiejar

   So there is one running instance of Konqueror, for this example lets 
assume that this is the one we want to use.. Issue another shell command;

      shell "dcop konqueror-4400 konqueror-mainwindow#1 openURL 
http://www.google.com"

   And Konqueror will go to google. This is EXACTLY what is desired. :)

   Likewise if we send it a fully qualified filename it will process and 
display the file (PNG, text, SWF, etc). OF course it has to have the 
plug-ins to handle movies, sound, and the like. Sooooo...

      dcop konqueror-4400 konqueror-mainwindow#1 openURL 
/home/username/Graphics/How\ software\ patents\ work.wmv

   will play the movie in Konqueror.. so long as it has a plug-in to 
handle the wmv.

   For any of you out there who used to use the Commodore Amiga and 
AREXX, this is similar to using the REXX port of an app to send it commands.



Fabien Bodard wrote:
> some test have been done by Laurent Carlier...
> 
> 2007/5/7, José Luis Redrejo <jredrejo at ...626...>:
> 
>>2007/5/7, sbungay <sbungay at ...981...>:
>>
>>>   There is a need to have GAMBAS applications talk to and control KDE
>>>applications (Konqueror in this case), and DCOP seems to be the only way
>>>to do this. Having looked through the email archives I see a few
>>>references to DCOP from long ago (2005) and a couple of recent ones, but
>>>nothing really useful.
>>>
>>>Questions:
>>>1. (a)  Can GAMBAS use DCOP to talk to Kde Applications?
>>>    (b)  If so How?
>>>
>>>2. (a) Is DCOP the only path to take?
>>>    (b) If not then what is/are the alternative(s)?
>>>
>>
>>The alternative should be dbus. It's the standard for the freedesktop
>>initiative. A gambas2-gb-dbus component would be great, but I'm sure
>>it is not an easy task.
>>Regards.
>>
>>-------------------------------------------------------------------------
>>This SF.net email is sponsored by DB2 Express
>>Download DB2 Express C - the FREE version of DB2 express and take
>>control of your XML. No limits. Just data. Click to get it now.
>>http://sourceforge.net/powerbar/db2/
>>_______________________________________________
>>Gambas-user mailing list
>>Gambas-user at lists.sourceforge.net
>>https://lists.sourceforge.net/lists/listinfo/gambas-user
>>
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 




More information about the User mailing list