freenode/#clim - IRC Chatlog
Search
4:40:41
loke
beach: After having spent time understanding Maxima a bit, I now have reached the point where I want to create a first version of a CLIM interface. Now, the interaction model of Maxima is basically that of a REPL: You type a command, you get some output. The commands a strings in Maxima format, and the output are equations, or sets of equation (and sometimes other things). What model should I base this on? Something that allows me to
4:40:41
loke
both input and output stuff, something like the interactor. Should I just use an appliction pane and put some input box there?
4:43:37
beach
The output seems straightforward, right? You receive math formulae from Maxima, so you format it into output records and display them.
4:45:08
loke
Right, but how do I read the input? So far I've alweays used the interactor to input stuff.
4:46:16
loke
I know that, but the interactor pane doesn't allow me to input arbitrary text, does it? It has commands with arguments and stuff.
4:47:06
loke
Exactly. And I guess that's my question. How do I do that? Is there an example I can look at?
4:50:03
loke
I just tested READ-LINE in a display funciton. And remarkably enough, it works, but the UI hangs white it sites in the READ-LINE and there is no echoing of characters, not editing capabilities.
4:51:35
loke
As for the interactor, there is no clear way to actually call READ-LINE. Also, the interactor will always fall back to its own input mechanism after it's done, so I don't think that's the correct way to go.
4:53:34
loke
I'm looking at the CLIM LIstener code. They use something called (MAKE-CLIM-STREAM-PANE) with an INTERACTOR-PANE
5:00:30
beach
The CLIM listener uses Drei as an input editor. Drei is the input-editor subset of (first) Climacs. I think you would want to do the same.
5:02:05
nyef
Actually, (ACCEPT 'STRING) might make a lot of sense, since it provides a natural path to (ACCEPT 'MAXIMA-INPUT) or whatever.
5:04:51
loke
When using interactor-pane, it automatically calls %ACCEPT (and I get an error because of unimplemented method)
5:09:00
loke
I'm still researching. I don't want you to waste time trying to sove something that I can fix within a few minutes of further study.
5:09:56
beach
Thanks. I'll be happy to help if you get stuck. But it's a bit early in the morning. I am still working on my coffee.
5:12:02
loke
Right. CLIM Listener implements the CLIM:READ-FRAME-COMMAND method. That's where the intelligence lies, I think.
5:12:33
red-dot
While I have never seen an implementation of this outside Genera, looking at the source for the command processor might provide a few hints about how to implement it.
5:14:03
red-dot
https://www.google.com.sg/url?sa=i&rct=j&q=&esrc=s&source=images&cd=&cad=rja&uact=8&ved=2ahUKEwjb58yM1PzZAhXHOY8KHVmHDUAQjRx6BAgAEAU&url=http%3A%2F%2Fwww.jmpol.com%2Fgenera.html&psig=AOvVaw0nuDOImEFY93C5f3Nchxg6&ust=1521695626843263
5:34:48
loke
And I can reuse previous commands by clicking on them (I need to change this so that clicking on a command brings it back to the propt for editing, but I'm sure that can be done easily)