Bugs fixed. More work on MARC utilities and queries. Test
[ir-tcl-moved-to-github.git] / iterate.tcl
1 # $Id: iterate.tcl,v 1.2 1995-05-26 11:44:10 adam Exp $
2 #
3 # Small test script which searches for science ...
4 proc init-response {} {
5     global count
6
7     set count 0
8     puts "In init-response"
9     do-search
10 }
11
12 proc do-search {} {
13     global count
14
15     incr count
16     puts $count
17     z callback {search-response}
18     z.1 search science
19 }
20
21 proc search-response {} {
22     set hits [z.1 resultCount]
23     if {$hits <= 0} {
24         do-search
25     }
26     z callback {present-response}
27     z.1 present 1 $hits
28 }
29
30 proc present-response {} {
31     do-search
32 }
33
34 ir z
35 z databaseNames DEM
36 z connect localhost:9999
37 z callback {init-response}
38 ir-set z.1 z
39 z init
40