parent
704a9963a1
commit
382a8b7c2d
@ -0,0 +1,25 @@
|
||||
Lookup := Object clone do(
|
||||
find := method(query, caller,
|
||||
wait(2);
|
||||
caller @@onFind(query asUppercase)
|
||||
)
|
||||
)
|
||||
|
||||
UI := Object clone do(
|
||||
run := method(
|
||||
stdin := File standardInput
|
||||
loop(
|
||||
"Give me a movie" println
|
||||
line := stdin readLine
|
||||
Lookup clone @@find(line, self)
|
||||
yield
|
||||
)
|
||||
)
|
||||
|
||||
onFind := method(response,
|
||||
"Got response: " println
|
||||
response println
|
||||
)
|
||||
)
|
||||
|
||||
UI run
|
Loading…
Reference in new issue