[mcclim-devel] file-selector problem
rpgoldman at real-time.com
rpgoldman at real-time.com
Fri Sep 16 21:39:00 UTC 2005
[SELECT-FILE crashes under ACL if called with no arguments.]
OK, seems like one problem for me is that the file-selector is not
happy when given a pathname argument (or a default) that has no :name
component. In that case it crashes (at least for me). I haven't
identified why.
So
(select-file) crashes but
(select-file :pathname (parse-namestring "/home/rpg/lisp/mcclim/file-selector.lisp"))
is fine.[1]
Here are my *default-pathname-defaults*:
CL-USER(11): *default-pathname-defaults*
#p"/home/rpg/lisp/mcclim/"
CL-USER(12): (describe *)
#p"/home/rpg/lisp/mcclim/" is a structure of type PATHNAME. It has these slots:
HOST NIL
DEVICE :UNSPECIFIC
DIRECTORY (:ABSOLUTE "home" "rpg" "lisp" "mcclim")
NAME NIL
TYPE NIL
VERSION :UNSPECIFIC
NAMESTRING "/home/rpg/lisp/mcclim/"
HASH NIL
DIR-NAMESTRING "/home/rpg/lisp/mcclim/"
PLIST NIL
... I don't know if these are odd...
gen-wild-pathname gives the following:
CL-USER(13): (clim-listener::gen-wild-pathname *default-pathname-defaults*)
#p"/home/rpg/lisp/mcclim/*.*"
CL-USER(14): (describe (clim-listener::gen-wild-pathname *default-pathname-defaults*))
#p"/home/rpg/lisp/mcclim/*.*" is a structure of type PATHNAME. It has these slots:
HOST NIL
DEVICE :UNSPECIFIC
DIRECTORY (:ABSOLUTE "home" "rpg" "lisp" "mcclim")
NAME :WILD
TYPE :WILD
VERSION :UNSPECIFIC
NAMESTRING NIL
HASH NIL
DIR-NAMESTRING NIL
PLIST NIL
Aha! If I change the default pathname argument to be the following:
(pathname (clim-listener::gen-wild-pathname *default-pathname-defaults*))
instead of just *default-pathname-defaults*, that seems to fix things
by changind NIL to :WILD for NAME.
A couple of remaning problems:
1. running select-file makes the size of the clim-listener window go
crazy. First, it shrinks to fit only the accepting-values (I'm
not sure I have the right term here), and leaves the directory
listing pane out of the window. Then, after I select a file, it
leaves only the
2. Unless I press return after entering a string in the filename
textbox, that input is simply discarded when I press Exit for the
file-selector as a whole. This is probably McCLIM's fault as a
whole, rather than yours, right? But it's quite annoying. The
user has the right to expect that what's on the screen is what is
going to be accepted. Adding an extra requirement for a "Simon
Says" gesture [2] is really a Bad Thing.
Footnotes:
[1] Ouch! I wish I could cut and paste out of the clim-listener!
:-/
[2] This is an American (poss British, too?) children's game, where
one player tries to trick the other into doing an action without
explicit permission being given.
More information about the mcclim-devel
mailing list