- fixed Canvas to export theCanvas for overriding

- QUESTION: how do I refer to theCanvas from the native Scheme methods? 

svn: r505
This commit is contained in:
Matthias Felleisen 2005-07-30 17:34:56 +00:00
parent 758848f66c
commit 871efa46cb
3 changed files with 3 additions and 19 deletions

View File

@ -23,6 +23,4 @@ public class Canvas {
public native boolean clearRect(Posn p, int width, int height, Color c);
public native boolean clearLine(Posn p0, Posn p1, Color c);
// public native boolean sleepForAWhile(int s);
}

View File

@ -72,7 +72,7 @@
(sleep-for-a-while s))
|#
(define/provide (bigBang-double-native this accs gets privates i)
(define/provide (bigBang-double-native this accs gets privates #;width #;height i)
(big-bang i this)
(on-tick-event
(lambda (world)
@ -94,20 +94,6 @@
;; (union Char Symbol) -> String
(define (keyevent->string ke)
(if (char? ke) (string ke) (symbol->string ke)))
#|
(define/provide (draw-native this accs gets privates)
(error 'draw "abstract method"))
(define/provide (erase-native this accs gets privates)
(error 'erase "abstract method"))
(define/provide (onTick-native this accs gets privates)
(error 'onTick "abstract method"))
(define/provide (onKeyEvent-java.lang.String-native this accs gets privates ke)
(error 'onKeyEvent "abstract method"))
|#
(define last-world #f)

View File

@ -2,9 +2,9 @@ package draw;
public abstract class World {
Canvas theCanvas = new Canvas();
public Canvas theCanvas = new Canvas();
public native boolean bigBang(double s);
public native boolean bigBang(/* int width, int height,*/ double s);
public native boolean endOfTime();