Help understanding command tables

Daniel Kochmański daniel at turtleware.eu
Thu Mar 7 08:58:26 UTC 2019


Hey Greg,

On Wed, 6 Mar 2019 20:45:32 -0500
Greg Bennett <gwbennett at sentex.ca> wrote:

> (find-command-table 'menubar-command-table) ; ->
> #<STANDARD-COMMAND-TABLE MENUBAR-COMMAND-TABLE {10018D6A43}>
> ;; OK
> 
> (command-table-name (find-command-table 'menubar-command-table))
> ;; ->MENUBAR-COMMAND-TABLE ;; possibly good
> 
> ;;; Before trying to modify things, check which commands are there
> (map-over-command-table-commands #'command-name (find-command-table 
> 'menubar-command-table))
> ;;->
> 
> The value
>    CLIM-INTERNALS::COM-NULL-COMMAND
> is not of type
>    LIST
> 
> I would appreciate pointers to what I have missed so far in exploring 
> command-tables.

>From map-over-command-table-commands specification[1]:

"Applies function to all of the commands accessible in the command table specified by the command table designator command-table. function must be a function that takes a single argument, the command name; it has dynamic extent. "

So if you want command names you simply go with:
(map-over-command-table-commands #'identity (find-command-table 'menubar-command-table))

nb: Commands are represented as a (list* command-name args)[2].

>From another note, I'm planning to write a blog post about commands soon. It will focus on "interfaces" as opposed to "application frames" to put some emphasis on "why CLIM is different", and where "Interface Manager" comes from (as opposed to "Toolkit" - that would make it CLT).

> 
> Cheers /Greg Bennett
> 

Best regards,
Daniel

[1] http://bauhh.dyndns.org:8000/clim-spec/27-2.html#_1404
[2] http://bauhh.dyndns.org:8000/clim-spec/27-1.html#_1374

-- 
Daniel Kochmański <daniel at turtleware.eu>



More information about the mcclim-devel mailing list