freenode/#clim - IRC Chatlog
Search
4:30:32
beach
loke: I haven't abandoned your project, but today my favorite coauthor will come over for lunch, so this morning I will cook for her, then have lunch, then work.
4:31:36
loke
I was slightly focusing on a different (but related) thing in the meantime. Perhaps you know something that can help me understand? :
4:32:33
loke
But... If I type a single character, and then click ona form, that form is inserted into the text-entry field.
4:32:53
loke
I want the same behaviour and I've been trying to figure out where CLIM-Listener makes that distinction.
9:48:35
Kaz
I am making a small app similar to the address-book demo to try out some things and learn.
9:49:49
Kaz
I have an accept method for the type person that read a token (the first name) and looks for the corresponding object in a list of persons.
9:51:31
Kaz
In the case where there are several persons with same first name I wanted to make a second call to accept with a member type.
9:53:07
beach
Kaz: I would love to help you, but my favorite coauthor is on her way to come here for lunch, so I am going to be busy for the next few hours. I hope someone else has the time to help you.
9:55:50
jackdaniel
[I don't have time now, but given I'll find it later today minimal example with actual code would help]
9:57:33
jackdaniel
what I'm suggesting is that you should paste link here with a minimal self-contained example of code I can run to reproduce the issue
10:32:59
Kaz
screen shot: https://github.com/thibaultlanglois/Clim-Howtos/blob/master/Screenshotat2018-06-13-11-22-05.png
10:34:35
Kaz
when I use the Change Last Name command and enter "Albert"<enter> with the keyboard I get the error.
10:48:47
jackdaniel
OK, so your problem is that you want to accept something of type `person' from the stream `stream'
10:49:06
jackdaniel
but you don't have person presented on the interactor pane, and that's where the command is invoked
10:49:42
jackdaniel
if you modify your snippet to be: (setq person (accept `(member ,@persons))) , then it will be able to find your person
10:52:42
jackdaniel
I'm not sure if you do it the right way (that you recursively call accept), but I don't know
11:07:03
Kaz`
https://github.com/thibaultlanglois/Clim-Howtos/blob/master/Screenshotat2018-06-1312-00-03.png
11:10:51
Kaz`
I have uploaded e more minimalistic version with 3 persons. 2 of them have the same first name. The idea was to accept the first name and if several person match, make recursive (member) accept restricted to the matches.
11:39:48
jackdaniel
Kaz`: your "reduced" example has dangling undefined functions, is not properly indented etc
11:39:56
jackdaniel
either way, a sketch of the solution is here: http://hellsgate.pl/files/cfdbde6a
11:41:11
jackdaniel
more elegant solution would avoid using dynamic variable, so keep in mind this is just a sketch
11:44:25
Kaz`
ok thank you. I was thinking that maybe it would be better to have an accept method for a list-of-person type and the function that receive the result would do different things denpending on the nember of elements.