projects
/
org.ibex.js.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ae38bda
)
automatically try call(JS[]) if method
author
adam
<adam@megacz.com>
Tue, 11 Jan 2005 08:12:32 +0000
(08:12 +0000)
committer
adam
<adam@megacz.com>
Tue, 11 Jan 2005 08:12:32 +0000
(08:12 +0000)
darcs-hash:
20050111081232
-5007d-
5561c2b2f28edfae32b4a109b14da0394ba9d049
.gz
src/org/ibex/js/JS.java
patch
|
blob
|
history
diff --git
a/src/org/ibex/js/JS.java
b/src/org/ibex/js/JS.java
index
a338311
..
a727048
100644
(file)
--- a/
src/org/ibex/js/JS.java
+++ b/
src/org/ibex/js/JS.java
@@
-93,10
+93,11
@@
public interface JS extends Pausable {
"object cannot be called, class ["+ getClass().getName() +"]"); }
public void pause() { throw new NotPausableException(); }
"object cannot be called, class ["+ getClass().getName() +"]"); }
public void pause() { throw new NotPausableException(); }
- public JS call(JS[] args) throws JSExn { throw new JSExn(
- "object cannot be called, class ["+ getClass().getName() +"]"); }
- public JS call(JS method, JS[] args) throws JSExn { throw new JSExn(
- "method not found: " + JSU.str(method)); }
+ public JS call(JS[] args) throws JSExn { throw new JSExn( "object cannot be called, class ["+ getClass().getName() +"]"); }
+ public JS call(JS method, JS[] args) throws JSExn {
+ if (method == null) return call(args);
+ throw new JSExn("method not found: " + JSU.str(method) + " class="+this.getClass().getName());
+ }
public String[] getFormalArgs() { return emptystr; }
public void declare(JS key) throws JSExn { throw new JSExn(
public String[] getFormalArgs() { return emptystr; }
public void declare(JS key) throws JSExn { throw new JSExn(