Differences From Artifact [f8cd7b3789]:

To Artifact [f14081cc23]:


14
15
16
17
18
19
20
21
22
23
24
25
26


27


28
29
30
31
32
33
34

;; macros in sugar don't work, have to load in all files or use compiled mode?
;;
;; (include "sugar.scm")

;; use this for getting data from page to page when scope and evals
;; get in the way
(define s:local-vars (make-hash-table))

(define (s:local-set! k v)
  (hash-table-set! s:local-vars k v))

(define (s:local-get k)


  (hash-table-ref/default s:local-vars k #f))



(define (s:log . msg)
  (apply session:log s:session msg))

(define (s:set-err . args)
  (sdat-set-curr-err! s:session args))








|

<
|

|
>
>
|
>
>







14
15
16
17
18
19
20
21
22

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

;; macros in sugar don't work, have to load in all files or use compiled mode?
;;
;; (include "sugar.scm")

;; use this for getting data from page to page when scope and evals
;; get in the way
;; save data for use in the page generation here. Does NOT persist across page reads.


(define *page-data* (make-hash-table))

(define (s:lset! var val)
  (hash-table-set! *page-data* var val))
(define (s:lget var . default)
  (hash-table-ref/default *page-data* var (if (null? default)
					      #f
					      (car default))))

(define (s:log . msg)
  (apply session:log s:session msg))

(define (s:set-err . args)
  (sdat-set-curr-err! s:session args))