images look like they're working

This commit is contained in:
Danny Yoo 2011-07-11 15:59:42 -04:00
parent ca7c8eb9a3
commit f4c426f41a
5 changed files with 17 additions and 6 deletions

View File

@ -2,4 +2,8 @@
(require (planet dyoo/whalesong/image)) (require (planet dyoo/whalesong/image))
(image-url "http://racket-lang.org/logo.png")
(define lst
(list (image-url "http://racket-lang.org/logo.png")
(image-url "http://www.bootstrapworld.org/images/icon.gif")))
(list lst lst)

View File

@ -131,19 +131,19 @@
node.appendChild(document.createTextNode("(")); node.appendChild(document.createTextNode("("));
var p = this; var p = this;
while ( p instanceof Cons ) { while ( p instanceof Cons ) {
appendChild(node, plt.baselib.format.toDomNode(p.first, cache)); node.appendChild(plt.baselib.format.toDomNode(p.first, cache));
p = p.rest; p = p.rest;
if ( p !== Empty.EMPTY ) { if ( p !== Empty.EMPTY ) {
appendChild(node, document.createTextNode(" ")); node.appendChild(document.createTextNode(" "));
} }
if (typeof(p) === 'object' && cache.containsKey(p)) { if (typeof(p) === 'object' && cache.containsKey(p)) {
break; break;
} }
} }
if ( p !== Empty.EMPTY ) { if ( p !== Empty.EMPTY ) {
appendChild(node, document.createTextNode(".")); node.appendChild(document.createTextNode("."));
appendChild(node, document.createTextNode(" ")); node.appendChild(document.createTextNode(" "));
appendChild(node, plt.baselib.format.toDomNode(p, cache)); node.appendChild(plt.baselib.format.toDomNode(p, cache));
} }
node.appendChild(document.createTextNode(")")); node.appendChild(document.createTextNode(")"));

View File

@ -0,0 +1,2 @@
(1 2 3)
("hello" "world")

View File

@ -0,0 +1,4 @@
#lang planet dyoo/whalesong
'(1 2 3)
(list "hello" "world")

View File

@ -14,3 +14,4 @@
(test "more-tests/man-vs-boy.rkt") (test "more-tests/man-vs-boy.rkt")
(test "more-tests/colors.rkt") (test "more-tests/colors.rkt")
(test "more-tests/images.rkt") (test "more-tests/images.rkt")
(test "more-tests/lists.rkt")