freenode/#clim - IRC Chatlog
Search
4:50:55
loke[m]
About the issue I posted yesterday. I have an even weirder observation (yes, I'll try to create a smaller test case)
4:52:11
loke[m]
I have a command (CMD-SHOW-CANVAS) which adds the pane that I linked to yesterday to the main frame. When I type that command on the interactor, the issue I explained happens (i.e. one of the sub-panels are not redrawn)
4:53:06
loke[m]
However, when I run the exact same command from a menu (the menu is defined as ("Show" :command cmd-show-canvas), then the pane gets redrawn correctly.
4:53:36
loke[m]
So, my question is: What is different between issuing a command on the interactor vs. running the same command via the menu that could cause redraw problems?
10:38:23
loke[m]
jackdaniel: I have found another regression. When I have a command that accepts arguments, and I bind that commend to a menu, it used to be that when selecting the menu entry, the interactor displayed the form that allowed the user to enter the arguments.
10:39:00
loke[m]
This changed some time ago, and now when I do it, I get an error saying that it attempted to call the command function with the wrong number of arguments.
10:40:17
loke[m]
I see. So it shouldn't be possible to bind menus to commands that accept arguments?
10:40:20
jackdaniel
if you want to put in a menu partial commands, you should do it like (com-foo *unsupplied-argument-marker* *unsupplied-argument-marker*)
10:44:07
jackdaniel
but to understand better the context of this change (I don't remember it exactly), I think that you need to look into the git history
10:44:42
loke[m]
Yeah. I tried it, and now the code literally tries to pass the symbol UNSUPPLIED-ARGUMENT-MARKER to the function. I'll create an example.
10:47:24
jackdaniel
loke[m]: did you do '(com-foo *unsupplied-argument-marker*) or maybe `(com-foo ,*unsupplied-argument-marker*) ?
10:50:13
jackdaniel
is the command plot2d-with-range added to the command table maxima-plot-command-table?
10:50:31
loke[m]
Yes. The other options work, and if I use the former (all quoted), then the meny entry is not greyed out and selecting it gives me an error when it tries to use 'unsupplied-argument-marker
10:53:42
loke[m]
Yeah. I'll create a testcase. I was collecting the relevant parts of the code, and it's a bit too much for you to reasonably look at. (for reference only, I don't expect you to actually look at this: https://gist.github.com/lokedhs/bb552a05a6cb902a7fe730bf476d3ec1 )
11:18:25
scymtym
http://clim.rocks/clim-spec/27-3.html#_1413 seems like just omitting arguments should be ok
11:24:43
scymtym
i added a reduced version in a comment: https://gist.github.com/lokedhs/bb552a05a6cb902a7fe730bf476d3ec1#gistcomment-3538699
11:50:06
scymtym
yes but the description for :COMMAND in http://clim.rocks/clim-spec/27-3.html#_1413 doesn't mention partial commands
11:53:54
jackdaniel
and if the command is (com-foo a b c), then (com-foo a b) doesn't seem like a valid command
11:54:45
jackdaniel
a partial command differs from a complete command by having a special marker, not by having less arguments
11:56:02
scymtym
the description of the command concept is purely syntactic from what i can tell, so (com-does-not-exist-in-any-command-table 1 2) would be a command
11:57:39
jackdaniel
command representation is indeed a list, however the fact that "parsers" exist and are specified seems to indicate, that the command as a concept is little more deeper than a list
11:58:09
scymtym
A-M-I-T-C-T talks about "In the case where all of the command's required arguments are supplied" which sounds like they may be referring to a defined command
11:58:17
jackdaniel
(i.e the system must know how to parse commands, so that information is stored i.e in a hash table that is keyed with a command name)
11:59:40
jackdaniel
I read it, that "all required arguments are supplied" == "there are no required unsupplied-argument-marker(s) on the list"
12:01:09
scymtym
it seems strange that you can omit arguments by writing COMMAND-NAME but not omit by writing (COMMAND-NAME 1 2) for a four-argument command
12:01:42
jackdaniel
for me it makes sense: command-name means "fetch the command signature", command verbatim means command verbatim
12:01:45
scymtym
since the command processor must be able to "fill in" the unsupplied arguments anyway in order to handle the COMMAND-NAME case
12:02:38
scymtym
yes, but if it can fetch the command signature in one case, why shouldn't it do that in the other case as well?