hack to get around another weird issue with dynamic evaluation Also fixing initialRendering of a view.
This commit is contained in:
parent
97fffce623
commit
24030a4cfd
|
@ -1,5 +1,4 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require racket/port)
|
|
||||||
|
|
||||||
(provide record-resource
|
(provide record-resource
|
||||||
get-records)
|
get-records)
|
||||||
|
@ -15,6 +14,21 @@
|
||||||
(hash-ref records a-path '()))
|
(hash-ref records a-path '()))
|
||||||
|
|
||||||
|
|
||||||
|
;; Hack to work around bug that should be fixed after 5.1.3. The dynamic
|
||||||
|
;; require-for-syntax stuff isn't quite working right, which means
|
||||||
|
;; we can't use (require racket/port) here.
|
||||||
|
(define (port->bytes p)
|
||||||
|
(define out (open-output-bytes))
|
||||||
|
(let loop ()
|
||||||
|
(define b (read-byte p))
|
||||||
|
(cond
|
||||||
|
[(eof-object? b)
|
||||||
|
(get-output-bytes out)]
|
||||||
|
[else
|
||||||
|
(write-byte b out)
|
||||||
|
(loop)])))
|
||||||
|
|
||||||
|
|
||||||
;; record-javascript-implementation!: path path a-resource-path -> void
|
;; record-javascript-implementation!: path path a-resource-path -> void
|
||||||
(define (record-resource a-module-path a-resource-path a-key)
|
(define (record-resource a-module-path a-resource-path a-key)
|
||||||
(hash-set! records a-module-path
|
(hash-set! records a-module-path
|
||||||
|
|
|
@ -37,7 +37,11 @@
|
||||||
|
|
||||||
// FIXME: we should pull in the styles applied to body and its
|
// FIXME: we should pull in the styles applied to body and its
|
||||||
// children and apply them here?
|
// children and apply them here?
|
||||||
top.append(this.top.find("body").children());
|
if (this.top.find("body").length > 0) {
|
||||||
|
top.append(this.top.find("body").children());
|
||||||
|
} else {
|
||||||
|
top.append(this.top);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// Return a list of the event sources from the view.
|
// Return a list of the event sources from the view.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user