Thu Jun 4 23:20:49 CEST 2009 Tobias Rautenkranz * interactive development diff -rN -u old-doc/introduction.xml new-doc/introduction.xml --- old-doc/introduction.xml 2014-10-30 07:12:23.000000000 +0100 +++ new-doc/introduction.xml 2014-10-30 07:12:23.000000000 +0100 @@ -14,17 +14,16 @@ Lisp-CFFI-Qt4 (dead) -
Status - -GUI creation should work and API will probably remain compatible. -The next goal is to reorganize the argument conversion / overload resolution and to -integrate more conversions between Lisp and C++ (QList etc.). - -
Limitations - Limited conversions. E.g. QList<T> is missing. - + Ownership transfer to / from C++ of non QObject objects is seldom known to cl-smoke. + E.g.: cl-smoke might delete an instance even though it is still needed by C++. + (One that is known is QUndoStack::push().) + + Limited conversions to and from C++. You will get an NO-APPLICABLE-CXX-METHOD error + when a Lisp to C++ conversion is missing and a pointer will be returned when there is no C++ to Lisp + conversion. + 10 seconds startup time Using an image it is around 1 second. @@ -33,13 +32,10 @@ (for qt.examples) on a Pentium M 1.7GHz. (Compilation ~20 seconds) Needs to be recompiled when the Smoke library is updated. - Does not recover well from errors - Thus you often need to restart the Lisp process - during interactive development.. + Could be faster No const-correctness
-
Installation
Dependencies @@ -106,7 +102,7 @@ You need to checkout the darcs repositories: cd SOME_DIR -for r in smoke qt qt.test qt.tests qt.examples qt.uitools qt.webkit kde kde.tests kde.examples; do +for r in smoke qt qt.test qt.tests qt.examples qt.uitools qt.webkit kde kde.tests kde.examples repl; do darcs get "http://tobias.rautenkranz.ch/lisp/cl-smoke/$r" done @@ -146,7 +142,7 @@ in the smoke/ and qt/ directories. - Some examples get the paths for files to load from their Mudballs system (ui and i18n) and thus will not work. + Some examples get the paths for the files to load from their Mudballs system (ui and i18n) and thus will not work.
diff -rN -u old-doc/kde.xml new-doc/kde.xml --- old-doc/kde.xml 2014-10-30 07:12:23.000000000 +0100 +++ new-doc/kde.xml 2014-10-30 07:12:23.000000000 +0100 @@ -15,7 +15,7 @@ (mb:load :kde.examples) -An the running the function of the example; e.g.: +And then running the function of the example; e.g.: (kde.examples:mandelbrot) diff -rN -u old-doc/qt.xml new-doc/qt.xml --- old-doc/qt.xml 2014-10-30 07:12:23.000000000 +0100 +++ new-doc/qt.xml 2014-10-30 07:12:23.000000000 +0100 @@ -47,6 +47,20 @@ a qt:application instance exists. When there are, for example, qt:widget instances at the end of qt:with-app, they are deleted by the qt:application destructor. +
Interactive Development + +The :cl-smoke.repl allows you to start a qt:application event loop in the background for +interactive development in SLIME. +To start the event loop use cl-smoke.repl:start-event-loop-in-background (or +cl-smoke.repl:start-event-loop-in-repl). + + +Currently START-EVENT-LOOP-IN-BACKGROUND is recommended. + + +As long as you do not kill the thread or unwind over a foreign function, you should be fine. + +
Signal-Slot @@ -66,7 +80,8 @@ When the argument types for a slot or signal are not specified they are determined when the first connection is made. Note that when connecting a qt:qsignal -to a qt:qslot at least one must have its arguments types specified. +to a qt:qslot at least one must have its arguments types specified. Type specifier T +allows to pass a Lisp object as is from a Lisp signal to a Lisp slot. @@ -132,7 +147,7 @@ Gettext is used to extract the i18n strings and compile the message catalog. See CMakeLists.txt and UseClQti18n.cmake -in the src directory of :qt.examples how to do this. +in the src/ directory of :qt.examples on how to do this.
diff -rN -u old-doc/smoke.xml new-doc/smoke.xml --- old-doc/smoke.xml 2014-10-30 07:12:23.000000000 +0100 +++ new-doc/smoke.xml 2014-10-30 07:12:23.000000000 +0100 @@ -10,9 +10,11 @@ to camel-case. Underscores #\_ are replaced with #\- and a leading uppercase K or Q is removed. + E.g.: QHelloWorld_foo becomes hello-world-foo. +
Class @@ -46,7 +48,7 @@
Methods -C++ methods are generic functions in the :cxx package. +C++ methods are generic functions in the :cxx package. The C++ method call: myInstance->frob(1); is in Lisp: @@ -116,10 +118,13 @@ Make sure you have the right number of arguments when adding a method; otherwise it will not be called. + +The arguments of the method might have dynamic extend; i.e.: they are only valid in the body of the method. +
Condition Unwinding of the C++ stack is not supported. This means that you must not invoke a restart that skips any foreign function. -You will most likely encounter this problem when an error is signaled in a virtual method you have overwritten +You will most likely encounter this problem when an error is signaled in a virtual method you have overwritten. For example an event handler that is called from the C++ library. @@ -196,10 +201,10 @@ You should be able to use C++ Class instances like normal Lisp object. -C++ classes are automatically deleted when their lisp object gets garbage collected; +C++ classes are automatically deleted when their Lisp object gets garbage collected; except when they (QObjects) have a parent and thus the parent is responsible for their deletion. When a qt:object has a parent, a strong -reference is kept to prevent its garbage collection until the parent is deleted. +reference is kept to prevent the garbage collection removing it until the parent is deleted. @@ -214,6 +219,11 @@ with the QObject. + + + Ownership transfer for non QObject instances is mostly unimplemented. + +
Saving a Core Image