Revision: 3511
http://vexi.svn.sourceforge.net/vexi/?rev=3511&view=rev
Author: clrg
Date: 2009-05-26 10:57:27 +0000 (Tue, 26 May 2009)
Log Message:
-----------
Couple of fixes
Modified Paths:
--------------
trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
trunk/core/org.vexi.core/src/org/vexi/core/WriteTrapChain.java
Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2009-05-26 02:29:53 UTC
(rev 3510)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp 2009-05-26 10:57:27 UTC
(rev 3511)
@@ -1251,7 +1251,7 @@
//#switch (JSU.toString(name))
case "__treedepth": return JSU.N(depth(this)); // FIXME: this is for
debugging - move to devl?
//case "props": return mirror();
- case "surface": return getSurfaceObject();
+ case "surface": return getSurfaceObject(parent);
case "forcereflow": return METHOD;
case "sendEvent": return METHOD;
case "distanceto": return METHOD;
@@ -1658,9 +1658,6 @@
// JS surface/visible Handling
////////////////////////////////////////////////////////
- /** shorthand for invoking getSurfaceObject a box parent */
- private final JS getSurfaceObject() throws JSExn { return
getSurfaceObject(parent); }
-
/** recursively attempt to fetch a surface object */
static private final JS getSurfaceObject(Box b) throws JSExn {
do {
@@ -1689,14 +1686,14 @@
if (trapchain == null) trapchain = new WriteTrapChain();
val = trapchain.beforeCascade(wtrap(SC_surface), val);
// interrupted by a JS exception
- if (trapchain.returnedNormally())
+ if (trapchain.interruptedByException())
return trapchain;
}
int i=0;
for (Box b = getChild(i); b!=null; b=getChild(++i)) {
trapchain = b.fireSurfaceTraps(val, trapchain);
// interrupted by a JS exception
- if (trapchain != null && trapchain.returnedNormally())
+ if (trapchain != null && trapchain.interruptedByException())
return trapchain;
}
return trapchain;
@@ -1713,7 +1710,7 @@
if (trapchain == null) trapchain = new WriteTrapChain();
val = trapchain.beforeCascade(wtrap(SC_visible), val);
// interrupted by a JS exception
- if (trapchain.returnedNormally())
+ if (trapchain.interruptedByException())
return trapchain;
}
int i=0;
@@ -1721,7 +1718,7 @@
if (b.test(DISPLAY)) {
trapchain = b.fireVisibleTraps(val, trapchain);
// interrupted by a JS exception
- if (trapchain != null && trapchain.returnedNormally())
+ if (trapchain != null && trapchain.interruptedByException())
return trapchain;
}
}
@@ -1777,7 +1774,7 @@
// FIXME handle Enter/Leave better
clear(MOUSEINSIDE);
boolean wasvisible = isVisible();
- JS oldsurface = getSurfaceObject();
+ JS oldsurface = getSurfaceObject(oldparent);
JS newsurface = getSurfaceObject(newparent);
// call pre-cascade traps
WriteTrapChain trapchain = oldsurface==newsurface ? null :
fireSurfaceTraps(newsurface, null);
Modified: trunk/core/org.vexi.core/src/org/vexi/core/WriteTrapChain.java
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/WriteTrapChain.java
2009-05-26 02:29:53 UTC (rev 3510)
+++ trunk/core/org.vexi.core/src/org/vexi/core/WriteTrapChain.java
2009-05-26 10:57:27 UTC (rev 3511)
@@ -15,11 +15,10 @@
/** add a trap on 'b.prop' to the trap chain by executing pre-put of 'val'
*/
public JS beforeCascade(Trap t, JS val) {
+ if (t == null) return val;
try {
- if (t != null) {
- chainlength++;
- return Main.SCHEDULER.runBeforePut(t, val);
- }
+ chainlength++;
+ return Main.SCHEDULER.runBeforePut(t, val);
} catch (JSExn e) {
chainlength--;
exn = e;
@@ -27,7 +26,7 @@
return null;
}
- public boolean returnedNormally() { return exn==null; }
+ public boolean interruptedByException() { return exn!=null; }
/** use to invoke internal finishTraps */
public void finishTraps() throws JSExn { finishTraps(exn); }
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, &
iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian
Group, R/GA, & Big Spaceship. http://www.creativitycat.com
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn