Revision: 4050
          http://vexi.svn.sourceforge.net/vexi/?rev=4050&view=rev
Author:   clrg
Date:     2011-03-16 01:34:53 +0000 (Wed, 16 Mar 2011)

Log Message:
-----------
Correct reflow()->reflowbox i.e. core->edit reflow

Modified Paths:
--------------
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
    trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/word.t

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t      
2011-03-15 18:11:43 UTC (rev 4049)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/block.t      
2011-03-16 01:34:53 UTC (rev 4050)
@@ -54,7 +54,7 @@
         thisbox.fontsize  ++= static.propagateOnWrite;
         thisbox.multiline ++= static.multilineWrite;
         thisbox.edit      ++= static.propagateOnWrite;
-        thisbox.reflowbox++= static.invokeReflow;
+        thisbox.reflowbox ++= static.invokeReflow;
         thisbox.textalign ++= static.invokeReflow;
         thisbox.textalign ++= static.textalignWrite;
         thisbox.text      ++= static.textRead;

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t       
2011-03-15 18:11:43 UTC (rev 4049)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/edit.t       
2011-03-16 01:34:53 UTC (rev 4050)
@@ -860,7 +860,9 @@
             if (newc!=null) {
                 var newt = oldt.substring(0, cp-1) + 
vexi.string.fromCharCode(newc) + oldt.substring(cp);
                 word.text = newt;
-                thisbox[cb].reflow();
+                // there is a miniscule possibility of the careted and 
un-careted
+                // characters being a slightly different width and needing 
reflow
+                thisbox[cb].reflowbox = true;
             }
         }
         

Modified: trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/word.t
===================================================================
--- trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/word.t       
2011-03-15 18:11:43 UTC (rev 4049)
+++ trunk/org.vexi-vexi.widgets/src_main/org/vexi/lib/text/word.t       
2011-03-16 01:34:53 UTC (rev 4050)
@@ -23,20 +23,26 @@
         thisbox.wordcolorset;
         thisbox.length;
         
-        // initialize from parent block
-        if (arguments[0]) {
+        {
+            // initialize from parent block
             var arg0 = arguments[0];
-            block = arg0;
-            if (arg0.wordcolor) {
-                textcolor = arg0.wordcolor;
-                wordcolor = arg0.wordcolor;
-                wordcolorset = true;
-            } else textcolor = arg0.textcolor;
-            $h.font = font = arg0.font;
-            $h.fontsize = fontsize = arg0.fontsize;
-            // initialize minheight
-            minheight = vexi.ui.font.height(font, fontsize, "dy");
-        } else throw "word arguments missing";
+            if (arg0) {
+                block = arg0;
+                if (arg0.wordcolor) {
+                    textcolor = arg0.wordcolor;
+                    wordcolor = arg0.wordcolor;
+                    wordcolorset = true;
+                } else {
+                    textcolor = arg0.textcolor;
+                }
+                $h.font = font = arg0.font;
+                $h.fontsize = fontsize = arg0.fontsize;
+                // initialize minheight
+                minheight = vexi.ui.font.height(font, fontsize, "dy");
+            } else {
+                throw "word arguments missing";
+            }
+        }
         
         // assign static functions to properties
         highlight ++= static.highlightWrite;
@@ -55,8 +61,8 @@
      *  - c2 - end character
      */
     static.partialHighlight = function(w, c1, c2) {
-        // just need a full highlight
         if (c1 == null and c2 == null) {
+            // just need a full highlight
             w.highlight = true;
             return;
         }
@@ -146,6 +152,12 @@
     static.textWrite = function(v) {
         var l = v.length;
         trapee.length = l;
+//        if (v!=null) {
+//        
+//        for (var i=0; l>i; i++) {
+//            vexi.trace(v.charAt(i)+": "+v.charCodeAt(i));
+//        }
+//        }
         // substitute tabs with spaces
         if (trapee.chartype == 0) {
             v = "";


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

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Vexi-svn mailing list
Vexi-svn@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vexi-svn

Reply via email to