projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2002/07/16 00:39:23
[org.ibex.core.git]
/
src
/
org
/
xwt
/
Static.java
diff --git
a/src/org/xwt/Static.java
b/src/org/xwt/Static.java
index
035a4ed
..
cb7a510
100644
(file)
--- a/
src/org/xwt/Static.java
+++ b/
src/org/xwt/Static.java
@@
-8,13
+8,14
@@
import org.mozilla.javascript.*;
public class Static extends JSObject {
public static Static getStatic(String resourcename) {
public class Static extends JSObject {
public static Static getStatic(String resourcename) {
+ return (Static)cache.get(resourcename);
+ }
+
+ public static Static createStatic(String resourcename) {
Static ret = (Static)cache.get(resourcename);
if (ret == null) {
Template t = Template.getTemplate(resourcename, null);
Static ret = (Static)cache.get(resourcename);
if (ret == null) {
Template t = Template.getTemplate(resourcename, null);
-
- // FIXME: ugly
if (t == null) return new Static(resourcename, true);
if (t == null) return new Static(resourcename, true);
-
ret = new Static(resourcename, false);
t.link();
return ret;
ret = new Static(resourcename, false);
t.link();
return ret;
@@
-58,4
+59,6
@@
public class Static extends JSObject {
return getStatic(resourcename + (resourcename.length() == 0 ? "" : ".") + name);
}
return getStatic(resourcename + (resourcename.length() == 0 ? "" : ".") + name);
}
+ static { createStatic(""); }
+
}
}