Correction for setup-plt error
svn: r11791
This commit is contained in:
parent
064eb9a147
commit
a454479345
|
@ -4,40 +4,40 @@ import geometry.*;
|
|||
import colors.*;
|
||||
|
||||
public class SillyCanvas extends Canvas {
|
||||
private int x = 20;
|
||||
private int y = 20;
|
||||
|
||||
private boolean warning() {
|
||||
return super.drawString(new Posn(x,y),"This is a Dummy Canvas.");
|
||||
}
|
||||
|
||||
SillyCanvas(int w, int h) {
|
||||
super(w,h);
|
||||
if ((w < x) || (h < y))
|
||||
throw new RuntimeException("SillyCanvas: bad size");
|
||||
}
|
||||
|
||||
public boolean drawCircle(Posn p, int r, IColor c) {
|
||||
return super.drawCircle(p,r,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawDisk(Posn p, int r, IColor c) {
|
||||
return super.drawDisk(p,r,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawRect(Posn p, int width, int height, IColor c) {
|
||||
return super.drawRect(p,width,height,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawLine(Posn p0, Posn p1, IColor c) {
|
||||
return super.drawLine(p0,p1,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawString(Posn p, String s) {
|
||||
return super.drawString(p,s) && warning();
|
||||
}
|
||||
|
||||
public boolean show() {
|
||||
return super.show() && warning();
|
||||
}
|
||||
private int x = 20;
|
||||
private int y = 20;
|
||||
|
||||
private boolean warning() {
|
||||
return super.drawString(new Posn(x,y),"This is a Dummy Canvas.");
|
||||
}
|
||||
|
||||
SillyCanvas(int w, int h) {
|
||||
super(w,h);
|
||||
if ((w < x) || (h < y))
|
||||
throw new RuntimeException("SillyCanvas: bad size");
|
||||
}
|
||||
|
||||
public boolean drawCircle(Posn p, int r, IColor c) {
|
||||
return super.drawCircle(p,r,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawDisk(Posn p, int r, IColor c) {
|
||||
return super.drawDisk(p,r,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawRect(Posn p, int width, int height, IColor c) {
|
||||
return super.drawRect(p,width,height,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawLine(Posn p0, Posn p1, IColor c) {
|
||||
return super.drawLine(p0,p1,c) && warning();
|
||||
}
|
||||
|
||||
public boolean drawString(Posn p, String s) {
|
||||
return super.drawString(p,s) && warning();
|
||||
}
|
||||
|
||||
public boolean show() {
|
||||
return super.show() && warning();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,12 +93,12 @@
|
|||
(let ((names (compilation-unit-contains dependents))
|
||||
(syntaxes (compilation-unit-code dependents))
|
||||
(locations (compilation-unit-locations dependents)))
|
||||
;(print-struct #t)
|
||||
;(printf "names ~a~n" names)
|
||||
;(printf "depends ~a~n~n" (compilation-unit-depends dependents))
|
||||
(print-struct #t)
|
||||
#;(printf "names ~a~n" names)
|
||||
#;(printf "depends ~a~n~n" (compilation-unit-depends dependents))
|
||||
(unless (= (length names) (length syntaxes))
|
||||
;(printf "Writing a composite file out~n")
|
||||
;(printf "~a~n~n" (syntax-object->datum (car syntaxes)))
|
||||
#;(printf "Writing a composite file out~n")
|
||||
#;(printf "~a~n~n" (syntax->datum (car syntaxes)))
|
||||
(call-with-output-zo-file* location
|
||||
(build-path (send type-recs get-compilation-location)
|
||||
(file-name-from-path
|
||||
|
@ -108,7 +108,8 @@
|
|||
(unless (= (length names) (length syntaxes) (length locations))
|
||||
(error 'compile-to-file "Internal error: compilation unit not represented as expected"))
|
||||
(for-each (lambda (name code location)
|
||||
;(printf "~a~n~n" (syntax-object->datum code))
|
||||
#;(printf "writing out ~a~n" name)
|
||||
#;(printf "~a~n~n" (syntax->datum code))
|
||||
(send type-recs set-location! location)
|
||||
(let ((directory (send type-recs get-compilation-location)))
|
||||
(unless (directory-exists? directory) (make-directory directory))
|
||||
|
|
|
@ -863,8 +863,10 @@
|
|||
(lambda (input)
|
||||
(and (= (length input) type-length)
|
||||
(equal? type-version (list-ref input 9))
|
||||
(or (equal? (version) (list-ref input 10))
|
||||
(equal? "ignore" (list-ref input 10)))
|
||||
(or (equal? "ignore" (list-ref input 10))
|
||||
(and (equal? (version) (list-ref input 10))
|
||||
(>= (file-or-directory-modify-seconds (build-path filename))
|
||||
(file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss")))))
|
||||
(make-class-record (list-ref input 1)
|
||||
(list-ref input 2)
|
||||
(symbol=? 'class (car input))
|
||||
|
@ -904,7 +906,10 @@
|
|||
(make-array-type (parse-type (cadr input)) (car input)))
|
||||
(else
|
||||
(make-ref-type (car input) (cdr input)))))))
|
||||
(parse-class/iface (call-with-input-file filename read))))
|
||||
#;(printf "~a ~a ~n" filename
|
||||
(>= (file-or-directory-modify-seconds (build-path filename))
|
||||
(file-or-directory-modify-seconds (build-path (collection-path "mzlib") "contract.ss"))))
|
||||
(parse-class/iface (call-with-input-file filename read))))
|
||||
|
||||
;; write-record: class-record port->
|
||||
(define (write-record rec port)
|
||||
|
|
Loading…
Reference in New Issue
Block a user