0.8.7.8: - condition handling - changed handling of coordinates: The functions that so far accepted a list of coordinates have been made much more flexible, they accept a list of pairs, an array of coordinates, any number type, even complex numbers now. (Complex numbers are treated as the coordinates of a point, with x being the real part of the number, y the imaginary) - choose-color - choose-directory - with-ltk now has a parameter list - after and after-idle return now an id which can be used to cancel the call with after-cancel :HANDLE-ERRORS determines what to do if an error is signaled. It can be set to T, NIL, :SIMPLE, or :DEBUG. When an error is signalled, there are four things LTk can do: (default) The simplest is to do nothing, which usually means you will end out in the SLIME debugger (although see the discussion of :DEBUGGER below). note Show a dialog box indicating that an error has occured. The only thing the user can do in this case is to hit "OK" and try to keep using the application. The "OK" button will invoke the ABORT restart, which in most cases will just return to the LTk main loop. show, offer to continue Show a dialog box containing the error message. If there is a CONTINUE restart, the user will be prompted with a question and presented with "Yes" button and a "No" button. If there is not CONTINUE restart, the only thing the user can do is to hit "OK". The "Yes" button will invoke the CONTINUE restart. The "No" and "OK" buttons will invoke the ABORT restart (see above). CONTINUE restarts are usually created by the CERROR function. In a situation where "show, offer to continue" is handling the error, the following code: (when (= (+ 1 1) 2) (cerror "Continue anyway" "One plus one is two.")) Will tell you that there is an error, display the error message "One plus one is two", and ask you "Continue anyway?". Contrast this with the following: (when (= (+ 1 1) 2) (error "One plus one is two.")) This will show the user the error "One plus one is two" and allow them to hit "OK". show, offer to start the debugger Show a dialog box containing the error message, and ask the user if they want to start the debugger. Answering "No" will abort (usually to the LTk main loop). Answering "Yes" will invoke the debugger; usually this means you will see the SLIME debugger, but see the description of :DEBUGGER below. LTk considers two types of errors: SIMPLE-ERRORs and all others. SIMPLE-ERROR is what is signalled when you type a form like (error "Something is wrong."). If :HANDLE-ERRORS is T, SIMPLE-ERRORs will be shown to the user, and all others (such as those generated by the Lisp system itself, eg, if you attempt to divide by zero) will be noted. In this model, you can call ERROR yourself to send an error message to the user in a user-friendly manner. If :HANDLE-ERRORS is NIL, LTk will not interfere with the normal error handling mechanism. For details of all the options, see the tables below. :HANDLE-WARNINGS can be T, NIL, or :DEBUG. :DEBUGGER can be T or NIL. If it is NIL, LTk will prevent the user from ever seeing the Lisp debugger. In the event that the debugger would be invoked, LTk will use its "trivial debugger" which dumps a stack trace and quits (note that this is only implemented on SBCL and CMUCL). This is useful in conjunction with :HANDLE-ERRORS T, which should never call the debugger; if :HANDLE-ERRORS is T and the debugger is called, this means that the system is confused beyond all hope, and dumping a stack trace is probably the right thing to do. :HANDLE-ERRORS T +--------------+--------------+--------------+--------------+ | (default) | note | show, offer | show, offer | | | | to continue | to start the | | | | | debugger | +--------------+--------------+--------------+--------------+ | | | XX XX | | SIMPLE-ERROR | | | XX | | | | | XX XX | | +--------------+--------------+--------------+--------------+ | | XX XX | | | ERROR | | XX | | | | | XX XX | | | +--------------+--------------+--------------+--------------+ :HANDLE-ERRORS :SIMPLE +--------------+--------------+--------------+--------------+ | (default) | note | show, offer | show, offer | | | | to continue | to start the | | | | | debugger | +--------------+--------------+--------------+--------------+ | | | XX XX | | SIMPLE-ERROR | | | XX | | | | | XX XX | | +--------------+--------------+--------------+--------------+ | XX XX | | | | ERROR | XX | | | | | XX XX | | | | +--------------+--------------+--------------+--------------+ :HANDLE-ERRORS :DEBUG +--------------+--------------+--------------+--------------+ | (default) | note | show, offer | show, offer | | | | to continue | to start the | | | | | debugger | +--------------+--------------+--------------+--------------+ | | | | XX XX | SIMPLE-ERROR | | | | XX | | | | | XX XX | +--------------+--------------+--------------+--------------+ | | | | XX XX | ERROR | | | | XX | | | | | XX XX | +--------------+--------------+--------------+--------------+ :HANDLE-ERRORS NIL +--------------+--------------+--------------+--------------+ | (default) | note | show, offer | show, offer | | | | to continue | to start the | | | | | debugger | +--------------+--------------+--------------+--------------+ | XX XX | | | | SIMPLE-ERROR | XX | | | | | XX XX | | | | +--------------+--------------+--------------+--------------+ | XX XX | | | | ERROR | XX | | | | | XX XX | | | | +--------------+--------------+--------------+--------------+ :HANDLE-WARNINGS T +--------------+--------------+--------------+ | (default) | show | show, offer | | | | to start the | | | | debugger | +--------------+--------------+--------------+ | | XX XX | | WARNING | | XX | | | | XX XX | | +--------------+--------------+--------------+ :HANDLE-WARNINGS :DEBUG +--------------+--------------+--------------+ | (default) | show | show, offer | | | | to start the | | | | debugger | +--------------+--------------+--------------+ | | | XX XX | WARNING | | | XX | | | | XX XX | +--------------+--------------+--------------+ :HANDLE-WARNINGS NIL +--------------+--------------+--------------+ | (default) | show | show, offer | | | | to start the | | | | debugger | +--------------+--------------+--------------+ | XX XX | | | WARNING | XX | | | | XX XX | | | +--------------+--------------+--------------+ 0.8.7.2: - exported the widget accessor master Thanks to Larry Clapp: - PACK-PROPAGATE generic function - SET-GEOMETRY-WH, SET-GEOMETRY-XY -- allow you to set width x height and X & Y independently. - Added MOUSE-BUTTON to EVENT structure, and associated usages, so if you BIND a mouse event, you can find out which button the user clicked. - Added an :APPEND key to the BIND generic function. When true, this puts a + on the front of the callback, and allows you to bind multiple functions to an event. - Added a method to PACK that accepts a LIST, allowing you to PACK multiple widgets in a single function call. 0.8.7: new methods: - append-newline appends a newline to a text widget - insert-object inserts an object at the end of a text widget - new function after-idle, which as after uses now unique names to refer the callback function, callback is removed after called. (removed optional label parameter from the after function) - the following widgets support all configuration options as keyword arguments to make-instance: frame, text, toplevel, entry, canvas, label, listbox, labelframe, spinbox, scrollbar, scale, paned-window, radio-button, check-button - classes for canvas items: canvas-line, canvas-polygon, canvas-oval, canvas-rectangle, canvas-text, canvas-image, canvas-arc - new functions focus, force-focus - configure generic function returns the widget configured (for stacking calls) - the documentation has corrected, naming now correctly the name "ltktest" for the test program. Thanks to all the people (to many to list here) wo notified me of that bug :) - new packages: ltk-mw, ltk-quicktime 0Ä.8.6: all parameters at button creation implemented all proper communication from wish to lisp in form of lists, allows to prevent synchronisation problems with data readback and tk events clear generic function added for canvas widget itemmove for canvas items added itembind for canvas items added image-setpixel method added underline and accelerator keyword args for menu creation 0.8.5: pack function uses keywords for parameters like :side :x instead of :side "x" new pack keywords after before padx pady ipadx ipady anchor (now complete) new widget scrolled-frame new create-line* function all canvas items supported now (new: arc bitmap rectangle window) get-text function no longer uses temporary file and is replaced buy the generic text function (settable) removed get-content and set-content methods for entry widget, use (text entry) and (setf (text entry) val) instead removed do-read-line as every tk output should be read-able now all grid keywords supported: columnspan ipadx ipady padx pady rowspan sticky (accepts keywords as values) new generic function background (settable), it is planned to wrap the common configuration options into settable generic functions renamed start-w send-w format-w read-w *w* to start-wish etc. after has an optional argument label now to distinguish several events which can now be scheduled in parallel configure function allows keywords for option and value now. 0.8.4: generic function (text widget) and (setf (text widget) value) in for those widgets that support text change. (missing: text widget) generic function (value widget) and (setf (value widget) val) in for check-button, radio-button, menucheckbutton, menuradiobutton, scale