Overview
Comment:Added some sugar; a default to s:shared-get and s:label
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | selfcontained
Files: files | file ages | folders
SHA1: 53f9eeed61d30eaaa44b72a4a5b7fbbe6a491f39
User & Date: matt on 2013-10-26 04:26:11
Other Links: branch diff | manifest | tags
Context
2013-11-18
06:24
Added note to makefile on compiling on bluehost check-in: 6dcf12e9a9 user: kiatoaco tags: selfcontained
2013-10-26
04:26
Added some sugar; a default to s:shared-get and s:label check-in: 53f9eeed61 user: matt tags: selfcontained
2013-09-22
17:35
Reworked howto. Added s:shared-hash, added s:if to sugar.scm check-in: 9cde8a89e8 user: matt tags: selfcontained
Changes

Modified setup.scm from [b6762fc909] to [2f0f47315f].

93
94
95
96
97
98
99
100


101
102
103
104
105
106
107


108
109

110
111
112
113
114
115
116
93
94
95
96
97
98
99

100
101
102
103
104
105
106
107
108
109
110
111

112
113
114
115
116
117
118
119







-
+
+







+
+

-
+








(define (s:load-model model)
  (session:load-model s:session model))

(define (s:model-path model)
  (session:model-path s:session model))

;; share data between pages calls
;; share data between pages calls. NOTE: This is not persistent
;; between cgi calls. Use sessionvars for that.
;;
(define (s:shared-hash)
  (sdat-get-shared-hash s:session))

(define (s:shared-set! key val)
  (hash-table-set! (sdat-get-shared-hash s:session) key val))

;; What to return when no value for key?
;;
(define (s:shared-get key)
  (hash-table-ref (sdat-get-shared-hash s:session) key))
  (hash-table-ref/default (sdat-get-shared-hash s:session) key #f))

;; http://foo.bar.com/pagename/p1/p2 => '("p1" "p2")
;;
(define (s:get-page-params)
  (sdat-get-page-params s:session))

(define (s:db)

Modified stml.scm from [aa92a72dd6] to [5ed3cd6335].

87
88
89
90
91
92
93

94
95
96
97
98
99
100
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101







+







(define (s:ul     . args) (s:common-tag "UL"     args))
(define (s:ol     . args) (s:common-tag "OL"     args))
(define (s:dl     . args) (s:common-tag "DL"     args))
(define (s:dt     . args) (s:common-tag "DT"     args))
(define (s:dd     . args) (s:common-tag "DD"     args))
(define (s:pre    . args) (s:common-tag "PRE"    args))
(define (s:span   . args) (s:common-tag "SPAN"   args))
(define (s:label  . args) (s:common-tag "LABEL"  args))

(define (s:dblquote  . args)
  (let* ((inputs (s:extract args))
         (data   (caar inputs))
         (params (s:process-params (cadr inputs))))
    (conc """ data """)))