[Laszlo-checkins] r12285 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9
bargull@openlaszlo.org
bargull at openlaszlo.org
Fri Jan 2 08:41:07 PST 2009
Author: bargull
Date: 2009-01-02 08:41:03 -0800 (Fri, 02 Jan 2009)
New Revision: 12285
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
Log:
Change 20081229-bargull-zLj by bargull at dell--p4--2-53 on 2008-12-29 18:19:52
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: implement "setHTML()" for swf9
New Features:
Bugs Fixed: LPP-7533
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Moved definition of "setHTML" from LzInputTextSprite to LzTextSprite (will be required for LPP-6617),
and added "html"-flag to LzTextSprite (Flash TextField hasn't got this flag anymore in AS3), if this flag is set, use "TextField#htmlText", otherwise "TextField#text" to set new text.
Tests:
see bugreport
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as 2009-01-02 09:00:09 UTC (rev 12284)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as 2009-01-02 16:41:03 UTC (rev 12285)
@@ -1,7 +1,7 @@
/**
* LzInputTextSprite.as
*
- * @copyright Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2001-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -166,13 +166,6 @@
}
}
- /**
- * Set the html flag on this text view
- */
- function setHTML (htmlp) :void {
- // TODO [hqm 2008-10] what do we do here?
- }
-
override public function getTextfieldHeight () {
return this.textfield.height;
}
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as 2009-01-02 09:00:09 UTC (rev 12284)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as 2009-01-02 16:41:03 UTC (rev 12285)
@@ -2,7 +2,7 @@
/**
* LzTextSprite.as
*
- * @copyright Copyright 2007, 2008 Laszlo Systems, Inc. All Rights Reserved.
+ * @copyright Copyright 2007-2009 Laszlo Systems, Inc. All Rights Reserved.
* Use is subject to license terms.
*
* @topic Kernel
@@ -47,6 +47,7 @@
public var sizeToHeight:Boolean = false;
public var password:Boolean = false;
public var scrollheight:Number = 0;
+ public var html:Boolean = true;
public function LzTextSprite (newowner = null, args = null) {
super(newowner,false);
@@ -276,9 +277,24 @@
}
}
+ /**
+ * Set the html flag on this text view
+ */
+ function setHTML (htmlp:Boolean) :void {
+ // do _not_ reset text, see swf8-kernel
+ this.html = htmlp;
+ }
+
public function appendText( t:String ):void {
- this.textfield.appendText(t);
- this.text = this.textfield.text;
+ this.text += t;
+ if (! this.html) {
+ this.textfield.appendText(t);
+ } else {
+ var df:TextFormat = this.textfield.defaultTextFormat;
+ // reset textformat to workaround flash player bug (FP-77)
+ this.textfield.defaultTextFormat = df;
+ this.textfield.htmlText = this.text;
+ }
}
public function getText():String {
@@ -299,11 +315,15 @@
public function setText ( t:String ):void {
//this.textfield.cacheAsBitmap = false;
this.text = t;
- var df:TextFormat = this.textfield.defaultTextFormat;
- // reset textformat to workaround flash player bug (FP-77)
- this.textfield.defaultTextFormat = df;
- this.textfield.htmlText = t;
-
+ if (this.html) {
+ var df:TextFormat = this.textfield.defaultTextFormat;
+ // reset textformat to workaround flash player bug (FP-77)
+ this.textfield.defaultTextFormat = df;
+ this.textfield.htmlText = t;
+ } else {
+ this.textfield.text = t;
+ }
+
if (this.resize && (this.multiline == false)) {
// single line resizable fields adjust their width to match the text
var w:Number = this.getTextWidth();
More information about the Laszlo-checkins
mailing list