Revision: 3178
          http://vexi.svn.sourceforge.net/vexi/?rev=3178&view=rev
Author:   clrg
Date:     2008-11-06 01:16:17 +0000 (Thu, 06 Nov 2008)

Log Message:
-----------
Fix the recent runBeforePut and runAfterPut usage in Box.jpp

Modified Paths:
--------------
    trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp

Modified: trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp
===================================================================
--- trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2008-11-06 00:51:23 UTC 
(rev 3177)
+++ trunk/core/org.vexi.core/src/org/vexi/core/Box.jpp  2008-11-06 01:16:17 UTC 
(rev 3178)
@@ -855,13 +855,13 @@
         if (this.minwidth == minwidth) return true;
         if (firetraps && test(MINWIDTH_TRAP)) {
             Trap t = wtrap(SC_minwidth);
-            JSExn exn = null;
-            try {
+            // FIXME: investigate this
+            //if (t==null && test(MINWIDTH_TRAP))
+            //    System.err.println("Should not happen, MINWIDTH_TRAP set and 
t==null");
+            if (t!=null) {
                 this.minwidth = JSU.toInt(Main.SCHEDULER.runBeforePut(t, 
JSU.N(minwidth)));
-            } catch (JSExn e) {
-                exn = e;
-            }
-            Main.SCHEDULER.runAfterPut(exn);
+                Main.SCHEDULER.runAfterPut(null);
+            } else this.minwidth = minwidth;
         } else this.minwidth = minwidth;
         if (this.minwidth>this.maxwidth) {
             // setMaxWidth call invokes setConstrain
@@ -882,13 +882,13 @@
         if (this.maxwidth == maxwidth) return true;
         if (firetraps && test(MAXWIDTH_TRAP)) {
             Trap t = wtrap(SC_maxwidth);
-            JSExn exn = null;
-            try {
+            // FIXME: investigate this
+            //if (t==null && test(MAXWIDTH_TRAP))
+            //    System.err.println("Should not happen, MINWIDTH_TRAP set and 
t==null");
+            if (t!=null) {
                 this.maxwidth = JSU.toInt(Main.SCHEDULER.runBeforePut(t, 
JSU.N(maxwidth)));
-            } catch (JSExn e) {
-                exn = e;
-            }
-            Main.SCHEDULER.runAfterPut(exn);
+                Main.SCHEDULER.runAfterPut(null);
+            } else this.maxwidth = maxwidth;
         } else this.maxwidth = maxwidth;
         if (this.minwidth>this.maxwidth) {
             // setMinWidth call invokes setConstrain
@@ -1565,6 +1565,7 @@
                     return Main.SCHEDULER.runBeforePut(t, val);
                 }
             } catch (JSExn e) {
+                chainlength--;
                 exn = e;
             }
             return null;
@@ -1574,8 +1575,13 @@
 
         private void finishTraps(JSExn exn) throws JSExn {
             while (chainlength>0) {
-                chainlength--;
-                Main.SCHEDULER.runAfterPut(exn);
+                try {
+                    chainlength--;
+                    Main.SCHEDULER.runAfterPut(exn);
+                    exn = null;
+                } catch(JSExn e) {
+                    exn = e;
+                }
             }
             if (exn != null) throw exn;
         }


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to