From 02e33b14dc483c8890fa1a6084c684473d94644b Mon Sep 17 00:00:00 2001 From: megacz Date: Fri, 30 Jan 2004 07:44:19 +0000 Subject: [PATCH] 2004/01/13 10:27:45 darcs-hash:20040130074419-2ba56-44688d4da1fbf0cb106b08220d987738becb1eb6.gz --- Makefile | 5 +++-- src/org/xwt/Box.java | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e60fd2a..d9677b8 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,8 @@ all_java_sources := $(java_sources) nonplat_java_sources := $(filter-out build/java/org/xwt/plat/%, $(java_sources)) build/java/org/xwt/translators/Freetype.java build/java/org/xwt/translators/MSPack.java build/java/org/xwt/translators/MIPSApps.java plat_java_sources := $(filter build/java/org/xwt/plat/%, $(java_sources)) -build/java/org/xwt/translators/MIPSApps.java: build/mips/mipsapps.mips build/class/org/xwt/mips/Compiler.class +build/java/org/xwt/translators/MIPSApps.java: build/mips/mipsapps.mips + make build/class/org/xwt/mips/Compiler.class mkdir -p build/java/org/xwt/translators @echo -e "\n\033[1mtranslating .mips -> .java: $<\033[0m" (echo -e 'package org.xwt.translators;\nimport org.xwt.mips.*;\n'; \ @@ -332,4 +333,4 @@ dist-private: #test: JVM; /System/Library/Frameworks/JavaVM.framework/Versions/1.3.1/Commands/java -jar build/JVM/xwt.jar http://localhost/demo.xwar test: JVM; java -jar build/JVM/xwt.jar http://localhost/demo.xwar -oldcompile: preprocess; CLASSPATH=$$CLASSPATH:lib/libgcj-minimal.jar javac -d build/class `find build/java/ src/org/xwt/mips -name \*.java` +oldcompile: preprocess; CLASSPATH=$$CLASSPATH:lib/libgcj-minimal.jar javac -d build/class `find build/java/ -name \*.java` diff --git a/src/org/xwt/Box.java b/src/org/xwt/Box.java index c4f34e5..9bb8645 100644 --- a/src/org/xwt/Box.java +++ b/src/org/xwt/Box.java @@ -175,7 +175,7 @@ public final class Box extends JSScope implements Scheduler.Task { // as external events have occured, check the state of box if (texture != null) { if (texture.isLoaded) { minwidth = min(texture.width, maxwidth); minheight = min(texture.height, maxheight); } - else { Stream res = texture.res; texture = null; throw new JSExn("image not found: "+res); } + else { JS res = texture.res; texture = null; throw new JSExn("image not found: "+res); } } MARK_REPACK; @@ -472,7 +472,7 @@ public final class Box extends JSScope implements Scheduler.Task { throw new Error("unreachable"); // unreachable } - private class Mouse extends JS { + private class Mouse extends JS.Cloneable { public Object get(Object key) { //#switch(key) case "x": return N(globalToLocalX(getSurface()._mousex)); @@ -642,10 +642,10 @@ public final class Box extends JSScope implements Scheduler.Task { int newfillcolor = stringToColor((String)value); if (newfillcolor == fillcolor) return; fillcolor = newfillcolor; - } else if(value instanceof Stream) { - texture = Picture.load((Stream)value, this); + } else if(value instanceof JS) { + texture = Picture.load((JS)value, this); } else { - throw new JSExn("fill must be null, a String, or a stream"); + throw new JSExn("fill must be null, a String, or a stream, not a " + value.getClass()); } dirty(); } -- 1.7.10.4