document setf & cleanup
Mon May 11 22:19:30 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* document setf & cleanup
diff -rN -u old-doc/qt.docbook new-doc/qt.docbook
--- old-doc/qt.docbook 2014-10-30 06:55:27.000000000 +0100
+++ new-doc/qt.docbook 2014-10-30 06:55:27.000000000 +0100
@@ -88,9 +88,9 @@
<section><title>Variant</title>
<para>
-A <classname>qt:variant</classname> can be constructed with <genericfunction>qt:make-variant</genericfunction>
+A <classname>qt:variant</classname> can be constructed with <methodname>qt:make-variant</methodname>
or to pass a Lisp object with <methodname>qt:make-lisp-variant</methodname>.
-Its value is returned by <methodname>qt:from-variant</methodname>.
+Its value is returned by <genericfunction>qt:value</genericfunction>.
</para>
</section>
diff -rN -u old-doc/smoke.docbook new-doc/smoke.docbook
--- old-doc/smoke.docbook 2014-10-30 06:55:27.000000000 +0100
+++ new-doc/smoke.docbook 2014-10-30 06:55:27.000000000 +0100
@@ -56,25 +56,40 @@
</para>
<section><title>Overload Resolution</title>
<para>
-C++ style overload resolution with conversion sequences is under development,
-but already usable. For example this:
+C++ style overload resolution with conversion sequences is suppored. For example this:
<informalexample>
<programlisting>
-(cxx:set-pen (make-instance '<classname>qt:painter</classname>)
- (make-instance '<classname>qt:color</classname> :args '("green")))
+(<genericfunction>cxx:set-pen</genericfunction> (make-instance '<classname>qt:painter</classname>) (make-instance '<classname>qt:color</classname> :args '("green")))
</programlisting>
</informalexample>
is equivalent to:
<informalexample>
<programlisting>
-(cxx:set-pen (make-instance '<classname>qt:painter</classname>) "green")
+(<genericfunction>cxx:set-pen</genericfunction> (make-instance '<classname>qt:painter</classname>) "green")
</programlisting>
</informalexample>
In the second case a temporary <classname>qt:color</classname> instance is implicitly created.
</para>
</section>
-<section><title>defmethod</title>
+<section><title>Setter Methods</title>
+<para>
+Instead of calling a setter method that takes no additional arguments,
+<informalexample>
+<programlisting>
+(<genericfunction>cxx:set-object-name</genericfunction> (make-instance '<classname>qt:object</classname>) "foo")
+</programlisting>
+</informalexample>
+you can use its <code>setf</code>able getter.
+<informalexample>
+<programlisting>
+(setf (<genericfunction>cxx:object-name</genericfunction> (make-instance '<classname>qt:object</classname>)) "foo")
+</programlisting>
+</informalexample>
+</para>
+</section>
+
+<section><title><code>defmethod</code></title>
<para>
You can extend the <package>:cxx</package> generic functions by
adding methods. <code>:around</code>, <code>:before</code>, <code>:after</code>
@@ -101,7 +116,7 @@
</section>
<section><title>Operators</title>
<para>
-Insted of using the various <code>cxx:operator</code> methods you can use their Lisp equivalent
+Instead of using the various <code>cxx:operator</code> methods you can use their Lisp equivalent
in the <package>:cxx</package> package.
<simplelist type='horiz' columns='4'>
<member><code>cxx:&gt;</code></member> <!-- FIXME mb.document handling of no alphnum chars !-->
@@ -144,9 +159,12 @@
which is equivalent to the C++ code <code>QByteArray::number(37);</code>.
Or with:
<informalexample>
-<programlisting>(cxx:number (find-class '<classname>qt:byte-array</classname>) 37)</programlisting>
+<programlisting>(<genericfunction>cxx:number</genericfunction> (find-class '<classname>qt:byte-array</classname>) 37)</programlisting>
+</informalexample>
+or:
+<informalexample>
+<programlisting>(<genericfunction>cxx:number</genericfunction> (make-instance '<classname>qt:byte-array</classname>) 37)</programlisting>
</informalexample>
-
</para>
</section>