+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
;;; Copyright 2002, 2003 Andreas Bernauer
|
|
|
|
|
|
|
|
|
|
|
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
|
|
;;; input-fields
|
|
|
|
;;; defines input-fields for surflets
|
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
;;; Globals
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define *input-field-trigger* `*input-field*)
|
2003-04-16 08:30:57 -04:00
|
|
|
(define generate-input-field-name generate-unique-name)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
;;; Data structure for real-input-field
|
|
|
|
;; MULTI?: Transformer will get all bindings of request, not only the
|
|
|
|
;; one concerning the input-field.
|
|
|
|
(define-record-type real-input-field :real-input-field
|
|
|
|
(make-real-input-field name type transformer
|
|
|
|
attributes html-tree-maker
|
|
|
|
html-tree multi?)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
real-input-field?
|
2003-04-16 08:30:57 -04:00
|
|
|
(name real-input-field-name)
|
|
|
|
(type real-input-field-type)
|
|
|
|
(transformer real-input-field-transformer)
|
|
|
|
(attributes real-input-field-attributes set-real-input-field-attributes!)
|
|
|
|
(html-tree-maker real-input-field-html-tree-maker)
|
|
|
|
(html-tree real-input-field-html-tree set-real-input-field-html-tree!)
|
|
|
|
(multi? real-input-field-multi?))
|
|
|
|
|
|
|
|
(define-record-discloser :real-input-field
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(lambda (input-field)
|
2003-04-16 08:30:57 -04:00
|
|
|
(list 'real-input-field
|
|
|
|
(real-input-field-type input-field)
|
|
|
|
(real-input-field-name input-field))))
|
|
|
|
|
|
|
|
;;; Fake input-field record. This is necessary, as the trigger in SXML
|
|
|
|
;;; may only be symbols, not arbitrary values. Thus, our input-fields
|
|
|
|
;;; must be preceeded by a trigger symbol to get recognized by the
|
|
|
|
;;; SXML transforming routines like sxml->html.
|
|
|
|
|
|
|
|
;; Constructors: make-input-field, make-multi-input-field
|
|
|
|
|
|
|
|
;; Predicates: input-field?
|
|
|
|
|
|
|
|
;; Selectors: input-field-name, input-field-type,
|
|
|
|
;; input-field-transformer, input-field-attributes,
|
|
|
|
;; input-field-html-tree-maker, input-field-html-tree,
|
|
|
|
;; input-field-multi?
|
|
|
|
|
|
|
|
;; Mutators: set-input-field-attributes!, touch-input-field!
|
|
|
|
|
|
|
|
;;; Constructors for input-field / multi-input-field
|
|
|
|
(define (make-input-field name type transformer attributes
|
|
|
|
html-tree-maker)
|
|
|
|
(make-sxml-input-field
|
|
|
|
(make-real-input-field name type transformer
|
|
|
|
attributes html-tree-maker #f #f)))
|
|
|
|
|
|
|
|
(define (make-multi-input-field name type transformer attributes
|
|
|
|
html-tree-maker)
|
|
|
|
(make-sxml-input-field
|
|
|
|
(make-real-input-field name type transformer
|
|
|
|
attributes html-tree-maker #f #t)))
|
|
|
|
|
|
|
|
(define (make-sxml-input-field real-input-field)
|
|
|
|
(list *input-field-trigger* real-input-field))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-07-23 09:45:34 -04:00
|
|
|
(define input-field-real-input-field cadr)
|
|
|
|
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define (input-field? input-field)
|
|
|
|
(and (pair? input-field)
|
|
|
|
(eq? *input-field-trigger* (car input-field))
|
2003-07-23 09:45:34 -04:00
|
|
|
(real-input-field? (input-field-real-input-field input-field))))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
(define (make-input-field-selector selector)
|
|
|
|
(lambda (input-field)
|
2003-07-23 09:45:34 -04:00
|
|
|
(selector (input-field-real-input-field input-field))))
|
2003-04-16 08:30:57 -04:00
|
|
|
|
2003-07-13 10:35:33 -04:00
|
|
|
(define (make-input-field-setter setter reset?)
|
|
|
|
(lambda (input-field value)
|
2003-07-23 09:45:34 -04:00
|
|
|
(let ((real-input-field (input-field-real-input-field input-field)))
|
2003-07-13 10:35:33 -04:00
|
|
|
(if reset?
|
|
|
|
(set-real-input-field-html-tree! real-input-field #f))
|
|
|
|
(setter real-input-field value))))
|
2003-04-16 08:30:57 -04:00
|
|
|
|
|
|
|
(define input-field-name (make-input-field-selector real-input-field-name))
|
|
|
|
(define input-field-type (make-input-field-selector real-input-field-type))
|
|
|
|
(define input-field-transformer
|
|
|
|
(make-input-field-selector real-input-field-transformer))
|
|
|
|
(define input-field-attributes
|
|
|
|
(make-input-field-selector real-input-field-attributes))
|
|
|
|
(define input-field-html-tree-maker
|
|
|
|
(make-input-field-selector real-input-field-html-tree-maker))
|
|
|
|
(define (input-field-html-tree input-field)
|
2003-07-23 09:45:34 -04:00
|
|
|
(let ((real-input-field (input-field-real-input-field input-field)))
|
2003-04-16 08:30:57 -04:00
|
|
|
(cond
|
|
|
|
((real-input-field-html-tree real-input-field)
|
|
|
|
=> identity)
|
|
|
|
(else
|
|
|
|
(let ((html-tree ((real-input-field-html-tree-maker real-input-field)
|
|
|
|
input-field)))
|
|
|
|
(set-real-input-field-html-tree! real-input-field html-tree)
|
|
|
|
html-tree)))))
|
|
|
|
|
|
|
|
(define input-field-multi?
|
|
|
|
(make-input-field-selector real-input-field-multi?))
|
|
|
|
|
2003-07-13 10:35:33 -04:00
|
|
|
(define set-input-field-attributes!
|
|
|
|
(make-input-field-setter set-real-input-field-attributes! #t))
|
2003-04-16 08:30:57 -04:00
|
|
|
;; not exported:
|
2003-07-13 10:35:33 -04:00
|
|
|
(define set-input-field-html-tree!
|
|
|
|
(make-input-field-setter set-real-input-field-html-tree! #f))
|
2003-04-16 08:30:57 -04:00
|
|
|
|
|
|
|
;; A touched input-field's html-tree will be recalculated if
|
|
|
|
;; neccessary.
|
|
|
|
(define (touch-input-field! input-field)
|
|
|
|
(set-input-field-html-tree! input-field #f))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-07-13 10:36:41 -04:00
|
|
|
;; <input-field>: '(input-field <real-input-field>)
|
2003-04-16 08:30:57 -04:00
|
|
|
;; <real-input-field>: #{Real-input-field "name"}
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define (raw-input-field-value input-field bindings)
|
2003-07-23 09:45:34 -04:00
|
|
|
(let ((real-input-field (input-field-real-input-field input-field)))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(cond
|
2003-04-16 08:30:57 -04:00
|
|
|
((real-input-field-multi? real-input-field)
|
2003-05-22 09:32:49 -04:00
|
|
|
((real-input-field-transformer real-input-field) input-field bindings))
|
2003-04-16 08:30:57 -04:00
|
|
|
((real-input-field-binding real-input-field bindings) =>
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(lambda (binding)
|
2004-07-21 16:09:37 -04:00
|
|
|
((real-input-field-transformer real-input-field)
|
|
|
|
input-field (cdr binding))))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(else
|
|
|
|
(error "no such input-field" input-field bindings)))))
|
|
|
|
|
|
|
|
;; Trys to get a value for INPUT-FIELD in BINDINGS. If this fails
|
|
|
|
;; (i.e. RAW-INPUT-FIELD-VALUE returns an error), the default-value is
|
|
|
|
;; returned. The default-value defaults to #f. NOTE: If you do this
|
|
|
|
;; with input-fields whose valid values may be the same as the default
|
|
|
|
;; value, you cannot determine by the result if there was such a value
|
|
|
|
;; or not. Keep in mind, that RAW-INPUT-FIELD-VALUE returns also an
|
|
|
|
;; error, if there was not such an input field. This makes
|
|
|
|
;; INPUT-FIELD-VALUE working with checkbox input fields because they
|
|
|
|
;; miss if they are not checked.
|
|
|
|
(define (input-field-value input-field bindings . maybe-default)
|
|
|
|
(let ((default (:optional maybe-default #f)))
|
|
|
|
(with-fatal-error-handler
|
|
|
|
(lambda (condition more)
|
2003-04-16 08:30:57 -04:00
|
|
|
; (format #t "hit error condition: ~s~%" condition)
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
default)
|
|
|
|
(raw-input-field-value input-field bindings))))
|
|
|
|
|
|
|
|
(define (real-input-field-binding input-field bindings)
|
2003-04-16 08:30:57 -04:00
|
|
|
(assoc (real-input-field-name input-field) bindings))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-05-22 09:32:49 -04:00
|
|
|
;; Returns the binding of the input-field in bindings by the
|
|
|
|
;; input-field's name. If your input-field will have another name in
|
|
|
|
;; the bindings than it was created with, use a multi-input-field.
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
(define (input-field-binding input-field bindings)
|
2003-07-23 09:45:34 -04:00
|
|
|
(real-input-field-binding (input-field-real-input-field input-field)
|
|
|
|
bindings))
|
+ Splitting file surflets.scm into several packages
- Removing surflets.scm
+ The surflets package remains and collects the most usual used packages
It does not export any more the outdaters, the access to IDs
(like session-id), callbacks, form-query-list.
(and maybe some other stuff I've forgot to mention here, see list
below).
The new packages are (not included in surflets are marked (*)):
+ surflets/addresses: MAKE-ADDRESS, MAKE-ANNOTATED-ADDRESS
+ surflets/bindings: GET-BINDINGS, EXTRACT-BINDINGS and stuff
+ surflets/ids (*): MY-SESSION-ID, .., INSTANCE-SESSION-ID
+ surflets/input-fields: MAKE-INPUT-FIELD, MAKE-NUMBER-INPUT-FIELD...
+ surflets/outdaters(*): MAKE-OUTDATER, OUTDATER?...
+ surflets/returned-via: RETURNED-VIA, CASE-RETURNED-VIA
+ surflets/send-html: SEND-HTML/SUSPEND...
+ surflets/surflet-sxml: URL-RULE,..., SURLFET-SXML-RULES, ...
+ surflets/sxml: SXML->STRING, DEFAULT-RULE,...
+ surflets/typed-optionals(*): TYPED-OPTIONALS, OPTIONALS
+ surflets/utilities(*): MAKE-CALLBACK, FORM-QUERY-LIST,
GENERATE-UNIQUE-NAME...
2003-03-10 11:29:32 -05:00
|
|
|
|
2003-04-16 08:30:57 -04:00
|
|
|
|
|
|
|
;;EOF
|