cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ovi...@apache.org
Subject cvs commit: xml-cocoon2/src/scratchpad/schecoon/scheme functions.scm
Date Wed, 13 Feb 2002 01:50:21 GMT
ovidiu      02/02/12 17:50:21

  Modified:    src/scratchpad/schecoon/scheme functions.scm
  Log:
  Removed user-defined functions outside. Define send-page and
  schecoon:handle-continuation.
  
  Revision  Changes    Path
  1.3       +17 -10    xml-cocoon2/src/scratchpad/schecoon/scheme/functions.scm
  
  Index: functions.scm
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/scratchpad/schecoon/scheme/functions.scm,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- functions.scm	1 Feb 2002 01:36:43 -0000	1.2
  +++ functions.scm	13 Feb 2002 01:50:21 -0000	1.3
  @@ -40,18 +40,25 @@
       (eval `(,funname ,sitemap ,env (quote ,params))
   	  (interaction-environment))))
   
  -(define continuations '())
  +(define (send-page sitemap env resource-name params bean-dict)
  +  (call/cc
  +   (lambda (k)
  +     (let ((kont-id (continuations:register k))
  +	   (suicide (environ:get-attr env "suicide")))
  +       (environ:set-attr env "kont" kont-id)
  +       (environ:set-attr env "bean-dict" bean-dict)
  +       (printf "send-page: kont ~s, kont id ~s~%" k kont-id)
  +       (resource-call-v sitemap env
  +			(list (cons 'resource resource-name)
  +			      (cons 'params params)))
  +       (suicide k))
  +     )))
   
  -(function (my-function sitemap env a b)
  - (call/cc
  -  (lambda (k)
  -    (set! continuations (cons k continuations)))))
  +(function (schecoon:handle-continuation sitemap env kont-id)
  +  (printf "handle-continuation invoked ~s~%" kont-id)
  +  (let ((kont (continuations:get kont-id)))
  +    (if kont (kont kont))))
   
  -;(function (my-function sitemap env a b)
  -; (call/cc
  -;  (lambda (k)
  -;    (set! continuations (cons k continuations))
  -;    (display (format "a = ~s, b = ~s, continuations = ~s~%" a b continuations)))))
   
   ;(function-call-v 1 2 '((function . "my-function")
   ;		       (params . (("a" . "3") ("b" . "4")))))
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message