X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=iterate.tcl;h=f95ece7345977d55d13ee5196c10e587697c8b22;hb=666316a92ba28594acd7e2611f3a05be34f14722;hp=65c506ee48cc14c49c03124692ffb9ec28a97bab;hpb=38d3a59423e91dc9c0985c678afdfba1837cdb5f;p=ir-tcl-moved-to-github.git diff --git a/iterate.tcl b/iterate.tcl index 65c506e..f95ece7 100644 --- a/iterate.tcl +++ b/iterate.tcl @@ -1,6 +1,15 @@ -# $Id: iterate.tcl,v 1.2 1995-05-26 11:44:10 adam Exp $ +# $Id: iterate.tcl,v 1.5 1996-08-21 11:24:01 adam Exp $ # # Small test script which searches for science ... +proc fail-back {} { + puts "Fail" +} + +proc connect-response {} { + z callback {init-response} + ir-set z.1 z + z init +} proc init-response {} { global count @@ -24,7 +33,11 @@ proc search-response {} { do-search } z callback {present-response} - z.1 present 1 $hits + if {$hits < 10} { + z.1 present 1 $hits + } else { + z.1 present 1 10 + } } proc present-response {} { @@ -32,9 +45,8 @@ proc present-response {} { } ir z -z databaseNames DEM +z failback {fail-back} +z databaseNames dummy +z callback {connect-response} z connect localhost:9999 -z callback {init-response} -ir-set z.1 z -z init - +vwait forever