[Laszlo-checkins] r11487 - openlaszlo/trunk/WEB-INF/lps/lfc/views
bargull@openlaszlo.org
bargull at openlaszlo.org
Fri Oct 17 09:00:32 PDT 2008
Author: bargull
Date: 2008-10-17 09:00:29 -0700 (Fri, 17 Oct 2008)
New Revision: 11487
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
Log:
Change 20081017-bargull-bcJ by bargull at dell--p4--2-53 on 2008-10-17 12:23:38
in /home/Admin/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: add cast in makeTextLink
New Features:
Bugs Fixed: LPP-7180
Technical Reviewer: hminsky
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Cast sprite to LzTextSprite in makeTextLink
Removed flash-specific code (was already out commented)
Replaced constant call to setAttribute (setAttribute("resize", ...)
Moved all LzText.attributes.* to on place
Tests:
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-10-17 14:53:57 UTC (rev 11486)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-10-17 16:00:29 UTC (rev 11487)
@@ -250,6 +250,20 @@
/** @access private */
static var attributes = new LzInheritedHash(LzView.attributes);
+LzText.attributes.pixellock = true;
+LzText.attributes.clip = true;
+
+/**
+ * If true, the text is selectable
+ *
+ * @lzxtype booleanLiteral
+ * @type Boolean
+ * @modifiers virtual
+// no var decl since this is a virtual field
+ * @access private
+ */
+LzText.attributes.selectable = false;
+
/** Sent whenever the text in the field changes.
* @lzxtype event
*/
@@ -305,7 +319,6 @@
return 0;
}
-LzText.attributes.pixellock = true;
/**
* If true, the lines of text are wrapped to fit within the text
@@ -464,7 +477,7 @@
this.xscroll = 0;
this.resize = ('resize' in args && (! (args.resize is LzValueExpr))) ? (!! args.resize) : this.resize;
- this.setAttribute('resize', this.resize);
+ this.$lzc$set_resize(this.resize);
if ('maxlength' in args && (! (args.maxlength is LzValueExpr)) && args.maxlength != null) {
this.$lzc$set_maxlength(args.maxlength);
@@ -549,7 +562,6 @@
override function getMCRef () {
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
return tsprite.getMCRef();
-// return this.__LZtextclip;
}
/**
@@ -557,16 +569,6 @@
*/
var $lzc$set_multiline = -1;
-/**
- * If true, the text is selectable
- *
- * @lzxtype booleanLiteral
- * @type Boolean
- * @modifiers virtual
-// no var decl since this is a virtual field
- * @access private
- */
-LzText.attributes.selectable = false;
/**
* Maximum number of characters allowed in this field
@@ -610,13 +612,6 @@
}
-LzText.attributes.clip = true;
-
-
-
-
-
-
/**
* setResize set behavior of text field width when new text is added.
* LzText only (cannot be used with LzInputText).
@@ -849,10 +844,9 @@
return ntxt;
}
-// Parses HTML attributes of the form attrname="val" to attrs, up
-// until a closing right pointy bracket, and returns the offset of
-// that closing char.
-/**
+/** Parses HTML attributes of the form attrname="val" to attrs, up
+ * until a closing right pointy bracket, and returns the offset of
+ * that closing char.
* @access private
*/
function parseImgAttributes(attrs, str) {
@@ -962,7 +956,7 @@
/**
* Returns an escaped version of the string if called with no args. If called
* with a string argument, returns an escaped version of that string (escaped
- * here means markup-escaped, hot http escaped.)
+ * here means markup-escaped, not http escaped.)
* @param String ts: text string to escape
*/
function escapeText( ts ){
@@ -1057,7 +1051,6 @@
this.multiline = (ml == true);
}
-/// extensions for flash6
/**
* @access private
@@ -1183,17 +1176,6 @@
}
-
-/**
- * @access private
- */
-//TODO Remove this
-/*
-function __LZforceScrollAttrs () {
- this.__LZtextclip.onScroller();
-}
-*/
-
/** Sets the horizontal scroll position
* @param Number s: horizontal scroll position
*/
@@ -1217,14 +1199,6 @@
if (end == null) { end = start; }
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
tsprite.setSelection(start, end);
- /*
- var sf = targetPath( this.__LZtextclip);
- if( Selection.getFocus() != sf ) {
- Selection.setFocus( sf );
- }
-
- Selection.setSelection( start , end );
- */
}
/**
@@ -1236,13 +1210,6 @@
function getSelectionPosition ( ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
return tsprite.getSelectionPosition();
- /*
- var sf = targetPath( this.__LZtextclip) ;
- if( Selection.getFocus() != sf ) {
- return -1;
- }
- return Selection.getBeginIndex();
- */
}
/**
@@ -1254,14 +1221,6 @@
function getSelectionSize ( ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
return tsprite.getSelectionSize();
- /*
- var sf = targetPath( this.__LZtextclip);
- if( Selection.getFocus() != sf ) {
- return -1;
- }
- var siz = Selection.getEndIndex() - Selection.getBeginIndex();
- return siz;
- */
}
/**
@@ -1275,7 +1234,7 @@
send an ontextlink event to the text view, with a value of VALUE.
*/
public function makeTextLink(str, value) {
- return this.sprite.makeTextLink(str,value);
+ return (this.sprite cast LzTextSprite).makeTextLink(str,value);
}
} // End of LzText
More information about the Laszlo-checkins
mailing list