[Laszlo-checkins] r9209 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf

bargull@openlaszlo.org bargull at openlaszlo.org
Sat May 17 03:36:17 PDT 2008


Author: bargull
Date: 2008-05-17 03:36:13 -0700 (Sat, 17 May 2008)
New Revision: 9209

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
Log:
Change 20080516-bargull-hKu by bargull at dell--p4--2-53 on 2008-05-16 20:30:10
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Setting text-format resets inputtext

New Features:

Bugs Fixed: LPP-6007 - "edittext deletes data on setAttribute('enabled',false) in 4.0.12"

Technical Reviewer: max
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
The LzInputTextSprite#text member doesn't contain the current text for a inputtext-sprite, to get the actual text, you need to query the flash-textfield through LzInputTextSprite#getText(). 


Tests:



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as	2008-05-17 05:25:47 UTC (rev 9208)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as	2008-05-17 10:36:13 UTC (rev 9209)
@@ -460,6 +460,13 @@
 }
 
 /**
+  * Returns the field's text.
+  */
+LzTextSprite.prototype.getText = function() {
+    return this.text;
+}
+
+/**
   * setText sets the text of the field to display
   * @param String t: the string to which to set the text
   */
@@ -604,7 +611,7 @@
     this.fontname = fname;
     this.__setFormat();
     // force recompute of height if needed
-    this.setText( this.text );
+    this.setText( this.getText() );
 }
 
 /**
@@ -614,7 +621,7 @@
     this.fontsize = fsize;
     this.__setFormat();
     // force recompute of height if needed
-    this.setText( this.text );
+    this.setText( this.getText() );
 
 }
 
@@ -625,7 +632,7 @@
     this.fontstyle = fstyle;
     this.__setFormat();
     // force recompute of height if needed
-    this.setText( this.text );
+    this.setText( this.getText() );
 }
 
 /**
@@ -635,7 +642,7 @@
 LzTextSprite.prototype.setColor = function ( c ){
     this.colorstring = "#" + c.toString( 16 );
     this.__setFormat();
-    this.setText( this.text );
+    this.setText( this.getText() );
 }
 
 /**



More information about the Laszlo-checkins mailing list