[climacs-devel] Re: a patch for climacs (mainly regarding COMPLETABLY-PATHNAME) + a gimmick
Robert Strandh
strandh at labri.fr
Thu Sep 1 19:16:17 UTC 2005
Max-Gerd Retzlaff writes:
> I propose that COM-SHOW-DIRECTORY should become a general PRESENT method
> for a presentation LIST OF PATHNAMES, as well as the construct
>
> (let ((icon (clim-listener::icon-of pathname)))
> (when icon
> (clim-listener::draw-icon stream icon :extra-spacing 30)))
> (princ (clim-listener::pathname-printing-name pathname long-name) stream))
>
> should be CLIM's general PRESENT method for PATHNAME in TEXTUAL-DIALOG-VIEW.
> (The latter is already defined in file-selector.lisp.)
This code has a problem (aside from the very unfortunate indentation),
namely that it assumes that the listener is present. At the moment, I
do not think that is a good idea.
This is going to be a general problem for other applications as well.
We are often going to want code that means "if this package exists and
this symbol has a function definition in that package, then call the
function with the following arguments" . Perhaps a macro
FUNCALL-IN-PACKAGE like this:
(funcall-in-package :clim-listener (#:icon-of pathname)
(message "sorry..."))
> PS: Should this discussion be on mcclim-devel instead?
Maybe so, yes.
--
Robert Strandh
---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
More information about the climacs-devel
mailing list