fix problem with more unmarshalable values in quick guide

svn: r6253
This commit is contained in:
Matthew Flatt 2007-05-24 03:13:47 +00:00
parent e217d98606
commit 3c8436802d
3 changed files with 7 additions and 10 deletions

View File

@ -4,10 +4,6 @@
(define-serializable-struct mr-exn (message))
;; Design to print the same as the real canvas:
(define-struct canvas-super ())
(define-serializable-struct (object:canvas% canvas-super) () #f)
(provide (struct mr-exn (message))))
(provide (struct mr-exn (message))
make-object:canvas%))

View File

@ -41,6 +41,7 @@
(0 () 0 () () (c! checkerboard c! (c! square c! 10)))
(2 (((lib "struct.ss" "scribble") . deserialize-info:element-v0) ((lib "struct.ss" "scribble") . deserialize-info:image-file-v0)) 0 () () (0 #f (c! (0 (1 (u . "quick/images/img9.png")) (c! "[image]")))))
(0 () 0 () () circle)
(1 (((lib "struct.ss" "scribble") . deserialize-info:element-v0)) 0 () () (0 "DarkBlue" (c! (u . "#<procedure:circle>"))))
(0 () 0 () () (c! define c! (c! series c! mk) c! (c! hc-append c! 4 c! (c! mk c! 5) c! (c! mk c! 10) c! (c! mk c! 20))))
(0 () 0 () () (void))
(0 () 0 () () (c! series c! circle))
@ -98,8 +99,8 @@
(0 () 0 () () (c! define c! (c! add-drawing c! p) c! (c! let c! (c! (c! drawer c! (c! make-pict-drawer c! p))) c! (c! new c! canvas% c! (c! parent c! f) c! (c! style c! (c! quote c! (c! border))) c! (c! paint-callback c! (c! lambda c! (c! self c! dc) c! (c! drawer c! dc c! 0 c! 0)))))))
(0 () 0 () () (void))
(0 () 0 () () (c! add-drawing c! (c! pict+code c! (c! circle c! 10))))
(1 (((lib "quick/exn.ss" "scribblings") . deserialize-info:object:canvas%-v0)) 0 () () (0))
(1 (((lib "struct.ss" "scribble") . deserialize-info:element-v0)) 0 () () (0 "DarkBlue" (c! (u . "#2(struct:object:canvas% ...)"))))
(0 () 0 () () (c! add-drawing c! (c! colorize c! (c! filled-flash c! 50 c! 30) c! "yellow")))
(1 (((lib "quick/exn.ss" "scribblings") . deserialize-info:object:canvas%-v0)) 0 () () (0))
(1 (((lib "struct.ss" "scribble") . deserialize-info:element-v0)) 0 () () (0 "DarkBlue" (c! (u . "#2(struct:object:canvas% ...)"))))
(0 () 0 () () (c! scale c! (c! bitmap c! "quick/art.png") c! 0.5))
(2 (((lib "struct.ss" "scribble") . deserialize-info:element-v0) ((lib "struct.ss" "scribble") . deserialize-info:image-file-v0)) 0 () () (0 #f (c! (0 (1 (u . "quick/images/img29.png")) (c! "[image]")))))

View File

@ -138,8 +138,8 @@
(((ss:make-pict-drawer) ((ss:colorize) v value-color)) dc 0 0)
(send bm save-file fn 'png)
(make-element #f (list (make-element (make-image-file fn) (list "[image]"))))))]
[(is-a? v (mred:canvas%))
(make-object:canvas%)]
[(pair? v) (cons (fixup-picts (car v))
(fixup-picts (cdr v)))]
[else v])))
[(serializable? v) v]
[else (make-element value-color (list (format "~s" v)))])))