Second-Climacs icon indicating copy to clipboard operation
Second-Climacs copied to clipboard

One potential source of inspiration for the commands

Open fstamour opened this issue 8 years ago • 1 comments

This is just a pointer.

In the README, it says:

We are working on a way of representing commands.  We will
probably go for something similar to the CLIM macro DEFINE-COMMAND
that mentions the types of the arguments.

Maybe you could look at how stumpwm does it for some inspiration.

I was about to say that it would be very nice if the "command module" of 2nd climacs was reusable for other projects. But it looks like you already took care of that (i.e. it has its own system).

fstamour avatar Jul 13 '16 12:07 fstamour

Hello,

I looked at how Stumpwm does it. It keeps a hash table with "interactive hints" that is separate from the function that is defined by DEFCOMMAND. One of the problems that I want to design a solution for is this separation between the command function and the hints.

Perhaps it is not a big deal, but it seems inelegant to me in that if you define a command and then later use FMAKUNBOUND to remove it, then the associated hints are still present in the hash table.

But I found a solution that I think is the best so far; even better than the one I had for CLIMatis. I define a subclass of STANDARD-GENERIC-FUNCTION that has an additional slot containing information on how to invoke the command.

Check the sub-directory named "Command".

robert-strandh avatar Jul 13 '16 14:07 robert-strandh