Trying to use McCLIM

Craig Lanning craig.t.lanning at gmail.com
Sat Oct 19 21:28:41 UTC 2019


See below.

On Sat, 2019-10-19 at 14:06 -0400, Craig Lanning wrote:
> On Sat, 2019-10-19 at 18:28 +0200, Daniel Kochmański wrote:
> > Hey,
> > 
> > Craig Lanning writes:
> > > Have you figured anything out about this issue?
> > > 
> > 
> > I think that reply from last Saturday on the mailing list from
> > Andrea
> > explains the issue:
> 
> I'm not on the mailling list so if it wasn't sent directly to me. I
> didn't see it.
> 
> > > I tried your code to see why the commands are disabled.  I think
> > > this is
> > > due to the fact that the commands are not inserted in the command
> > > table:
> 
> That is interesting since LispWorks and Symbolics don't expect the
> commands to be in the table. I think they add them to the table since
> they show up in the menu. I'll check in LispWorks to see if directly
> adding them to the table causes any problems.

I end up having to define the command-table, then define the commands
(adding them to the appropriate tables), then add menu items to each
command table for the appropriate commands.

I think that for this reason Symbolics and LispWorks each have the
command table automatically add commands that show up in the command
table. This way you only need to define the commands and the command
table. You don't have to run any other functions to get your command-
tables to have the correct menu and command entries. I think that the
original CLIM intent was that the user would only have to define the
commands and the command-table and do nothing else.

Once I got the app working with McCLIM, I noticed that sometimes when I
click on another class to change what is being displayed, it doesn't
properly update the display panes.

> > > --------
> > > CB> (command-present-in-command-table-p 'com-show-info 'cb-file)
> > > NIL
> > > --------
> > > Evidently Symbolics and Franz versions of macro define-command-
> > > table
> > > automatically add the commands in :menu argument to the command-
> > > table,
> > > mcclim version no.
> > > So you need to add by hand the commands to command-table like
> > > that:
> > > ---------
> > > (add-command-to-command-table 'com-show-info 'cb-file)
> > > ---------
> > > or use the :command-table name option in define command (for this
> > > you
> > > need to define the command-table before the command):
> 
> This is interesting since I have to define the table after the
> commands
> for them to be picked up due to the menu.
> 
> > > -----------
> > > (define-command (com-show-info :command-table cb-file) ()
> > >   ...
> > >   ...)
> > > -----------------
> > 
> > Jan also had few remarks on IRC (partially overlapping with the
> > above):
> > 
> > > jackdaniel if anyone feels like debugging why commands are
> > > disabled
> > > in a definition which looks fine at the first glance please take
> > > a
> > > look at 
> > > 
https://mailman.common-lisp.net/pipermail/mcclim-devel/2019-October/002129.html
> > > scymtym jackdaniel: the commands don't seem to be defined within
> > > any command table. adding e.g. :command-table cb-file enables the
> > > menu entries
> > > scymtym i haven't seen commands defined like that before
> > > scymtym the spec says without :command-table, the command will
> > > not
> > > be added to any command table. i would assume that makes the
> > > command not accessible in the menu command table
> > > scymtym this example programs assumes CLASS is a builtin
> > > presentation type and CLASS-NAME can be applied to slots
> > > scymtym it's pretty weird
> 
> I found a few issues with my code after I sent it. After I fixed the
> issues I sent a newer version of my code to both Daniel and the list.
> 
> Craig
> 
> > Best regards,
> > Daniel
> > 
> > --
> > Daniel Kochmański ;; aka jackdaniel | Przemyśl, Poland
> > TurtleWare - Daniel Kochmański      | www.turtleware.eu
> > 
> > "Be the change that you wish to see in the world." - Mahatma Gandhi




More information about the mcclim-devel mailing list