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

List:       kde-commits
Subject:    branches/KDE/3.5/kdewebdev/doc/kommander
From:       Eric Laffoon <sequitur () kde ! org>
Date:       2008-02-10 21:40:12
Message-ID: 1202679612.898888.22008.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 773370 by sequitur:

updated so it's somewhat more relevant 

 M  +19 -7     dcop.docbook  


--- branches/KDE/3.5/kdewebdev/doc/kommander/dcop.docbook #773369:773370
@@ -20,28 +20,37 @@
 <title>&DCOP; Functions</title>
 
 <para>
-&DCOP; can be called in several ways in &kommander;.  First is the console method
+&kommander; began accessing it's widgets internally with &DCOP;, which evloved to \
widget functions. &DCOP; is still available and can be used to share information \
between dialogs. It can also be used to extend and integrate nearly every existing \
KDE application. +&DCOP; can be called in several ways in &kommander;.  First is the \
console method. Open a &kommander; dialog and open a console and try this.  </para>
+<screen>
+dcop | grep kmdr
+dcop `dcop | grep kmdr`
+dcop `dcop | grep kmdr` KommanderIf
+</screen>
 <para>
-dcop kmdr-executor-@pid KommanderIf changeWidgetText myWidget <quote>new \
text</quote> +This will show you what dialogs are running and what interfaces are \
available, as well as what is available to call in the &kommander; special interface \
to internals. In the explanation of &DCOP; here remember that &DCOP; is used \
internally by KDE applications (replaced with DBUS in KDE4) and it is very useful. \
Have a look at kdcop by pressing Alt-F2 and typing it in a run dialog. Here you can \
explore everything running. Now back to &DCOP; in &kommander;.  </para>
 <para>
+dcop kmdr-executor-@pid KommanderIf setText myWidget <quote>new text</quote>
+</para>
+<para>
 This assumes you are inside a &kommander; file and have access to the special @pid \
which contains the process ID.  In fact it is simpler to replace \
<quote>kmdr-executor-@pid</quote> with @dcopid.  However, you can use this syntax \
(obviously without the specials) from the command line or any external script to \
alter the &kommander; window.  </para>
 <para>
-Because &kommander; does not have a full parser in it's Alpha stage, if you want to \
use the much faster internal &DCOP; from another application window (console &DCOP; \
is very slow) it is more complicated because you must give lots of information, \
including a prototype of the call.  The above call would become: +&kommander; evolved \
the much faster internal &DCOP; function. Using it from another application window \
(console &DCOP; is very slow) is more complicated because you must give lots of \
information, including a prototype of the call.  The above call would become: (Note \
that @dcopid is actually internal to the dialog, but you could replace it with a \
valid process ID)  </para>
 <para>
 @dcop(@dcopid, KommanderIf, <quote>enableWidget(QString, bool)</quote>, Widget, \
true)  </para>
 <para>
-At the time of this writing you should be aware that nesting &DCOP; calls inside \
script language structures (like <application>bash</application>) means that you must \
use console method calls.  <emphasis>If you use internal &DCOP; all &kommander; \
specials will be executed first and then the script will be executed.</emphasis> +In \
the early &kommander; nesting &DCOP; calls inside script language structures (like \
<application>bash</application>) used console method calls.  <emphasis>If you use \
internal &DCOP; all &kommander; specials will be executed first and then the script \
will be executed.</emphasis> Please read that again as it will cause you no end of \
grief with a <application>bash</application> loop using &kommander; specials.  \
</para>  <para>
 There is a new simplified way to use &DCOP; inside &kommander; using an object \
syntax. Let's say you want to change the text in a widget name @LineEdit1. It would \
look like this.  </para>
 <para>
-@LineEdit1.changeWidgetText(New text)
+@LineEdit1.setText(New text)
 </para>
 <para>
 As you can see the new syntax is very easy, as well as consistent visually with \
function groups. All the &DCOP; reference here will use the new object syntax listed \
above. <emphasis>Please note that if you are referencing a widget using &DCOP; from \
another window or another application the first parameter will always be the widget \
name. All functions are listed here starting with the second parameter.</emphasis> @@ \
-72,12 +81,15 @@  <sect2 id="dcop-all">
 <title>&DCOP; for all Widgets</title>
 
+<para>
+The folling list is old and left here for reference purposes only. For a complete \
and current reference to all widget functions please look at the <emphasis>Function \
Browser</emphasis> which is available from any &kommander; text editor window by \
pressing the lower left button. These are now widget functions, not &DCOP; functions \
but the &DCOP; functions are published in the <emphasis>KommanderIf</emphasis> &DCOP; \
interface as described above. Dialogs for listing and constructing calls for this \
functionality are available at our web site. +</para>
 <variablelist>
 <varlistentry>
-<term>changeWidgetText(QString text)</term>
+<term>setText(QString text)</term>
 <listitem>
 <para>
-This should be renamed setWidgetText and this name will probably be deprecated.  \
This removes the text displayed int he widget and replaces it with the text supplied. \
+This removes the text displayed int he widget and replaces it with the text \
supplied.  </para>
 </listitem>
 </varlistentry>


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

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