[Laszlo-checkins] r10403 - in openlaszlo/trunk/WEB-INF/lps/lfc: controllers core data helpers views
pbr@openlaszlo.org
pbr at openlaszlo.org
Thu Jul 17 12:28:00 PDT 2008
Author: pbr
Date: 2008-07-17 12:27:54 -0700 (Thu, 17 Jul 2008)
New Revision: 10403
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzCommand.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs
openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
Log:
Change 20080714-Philip-4 by Philip at Philip-DC on 2008-07-14 09:18:13 EDT
in /cygdrive/f/laszlo/svn/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Add deprecation warnings to the docs for setXXX methods
New Features:
Bugs Fixed: LPP-5644 (partial)
Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
This is mostly a doc change. Methods such as lz.view.setVisible() are marked deprecated in the docs and tell the user to use
setAttribute('visible',...) instead. If the setNNN method was already marked private it continues to be marked private.
I fixed some setter methods that do not set the underlying variable.
This permits the value to be read back using this['name'] syntax. For example, lz.view.setLayout() now sets this.layout.
Tests:
smoketest, lzpix
Files:
M WEB-INF/lps/lfc/core/LzNode.lzs
M WEB-INF/lps/lfc/views/LzInputText.lzs
M WEB-INF/lps/lfc/views/LzText.lzs
M WEB-INF/lps/lfc/views/LaszloView.lzs
M WEB-INF/lps/lfc/helpers/LzCommand.lzs
M WEB-INF/lps/lfc/helpers/LzState.lzs
M WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
M WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
M WEB-INF/lps/lfc/data/LzReplicationManager.lzs
M WEB-INF/lps/lfc/data/LzDataText.lzs
M WEB-INF/lps/lfc/data/LzDataset.lzs
M WEB-INF/lps/lfc/data/LzDatapath.lzs
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080714-Philip-4.tar
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LaszloAnimation.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -89,6 +89,7 @@
}
/**
* @deprecated in 4.1
+ * @deprecated Use setAttribute('motion', ...) instead.
* @access private
*/
function setMotion (eparam) {
@@ -109,6 +110,7 @@
}
/**
* @deprecated in 4.1
+ * @deprecated Use setAttribute('to', ...) instead.
* @access private
*/
function setTo (eparam) {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/controllers/LzAnimatorGroup.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -280,6 +280,7 @@
}
/** Remove after 4.1
+ * @deprecated Use setAttribute('target', ...) instead.
* @access private */
function setTarget (n) {
if ($debug) {
@@ -456,6 +457,9 @@
}
+/** Remove after 4.1
+ * @deprecated Use setAttribute('duration', ...) instead.
+ * @access private */
function setDuration(duration){
if ($debug) {
Debug.deprecated(this, arguments.callee, this.setAttribute);
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -1281,7 +1281,7 @@
}
if ( !this.datapath ){
- this.setDatapath( "." );
+ this.setAttribute('datapath', ".");
}
if ( ! this.__LZdelegates ){
@@ -1644,6 +1644,7 @@
* Sets the datacontext for the node to the xpath given as an argument
* @access public
* @param String dp: The string to use as the datapath.
+ * @deprecated Use setAttribute('datapath', ...) instead.
*/
function setDatapath ( dp ) {
if (null != this.datapath && dp != LzNode._ignoreAttribute) {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataText.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -55,6 +55,7 @@
/**
* Sets the string that this node holds.
* @param String newdata: The new string for this node.
+ * @deprecated Use setAttribute('data', ...) instead.
*/
public function setData ( newdata:String ) {
this.data = newdata;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDatapath.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -187,6 +187,7 @@
* @param String xpath: An XPath giving the value to use for comparison.
* @param Function|String comparator: See the <param>comparator</param>
* parameter of <method>setComparator</method> for details.
+ * @deprecated Use setAttribute('order', ...) instead.
*
* @access private
*/
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzDataset.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -446,6 +446,7 @@
* Sets the data for the dataset
* @param data a LzDataElement or list of Elements
* @param headers optional HTTP response headers
+ * @deprecated Use setAttribute('data', ...) instead.
* @access private
*/
override function setData( data , headers = null ) {
@@ -543,6 +544,7 @@
/**
* Sets the src attribute of the data request.
+ * @deprecated Use setAttribute('src', ...) instead.
* @param String src: A new src URL for data request.
Need to handle these cases
@@ -584,6 +586,7 @@
* Sets whether or not the dataset makes its request upon initialization
* @param Boolean b: If true, the dataset will make its request when it is
* initialized
+ * @deprecated Use setAttribute('request', ...) instead.
*/
function setRequest( b ) {
this.request = b;
@@ -814,6 +817,7 @@
*
* @access private
* @param b: A boolean value - true to turn on autorequest, false to turn off
+ * @deprecated Use setAttribute('autorequest', ...) instead.
*/
function setAutorequest(b) {
this.autorequest = b;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/data/LzReplicationManager.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -702,6 +702,7 @@
* over the slot that a named replicated view occupied in the parent. (See
* comment on the class as a whole, above.)
* @param String xp: An xpath.
+ * @deprecated Use setAttribute('datapath', ...) instead.
* @access private
*/
override function setDatapath ( xp ){
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzCommand.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzCommand.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -47,12 +47,12 @@
/** array of keys (strings) that, when pressed together,
* cause the onselect event of the command to be sent. For example:
- * setAttribute('key', ['a', 'shift']) or setKeys(['j', 'control'])
+ * setAttribute('keys', ['a', 'shift']) or setKeys(['j', 'control'])
* @type [String]
*/
var keys = null;
/** @access private */
-function $lzc$set_key(v) { this.setKeys(v); }
+function $lzc$set_keys(v) { this.setKeys(v); }
/**
* If the command is active, this event is sent
@@ -70,6 +70,7 @@
* This registers the given key array so that the command is executed when the
* key array is pressed.
* @param [String] k: An array of keys, given as strings.
+ * @deprecated Use setAttribute('keys', ...) instead.
*/
function setKeys ( k ){
this.keys = k;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/helpers/LzState.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -257,6 +257,7 @@
/**
* @access private
+ * @deprecated Use setAttribute('applied', ...) instead.
*/
function setApply ( doapply ){
if ($debug) {
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -1086,9 +1086,10 @@
* To remove the previously set layout, use <code>{'class': 'none'}</code>
* (Note that you must use <code>'class'</code> as the key, because
* <code>class</code> is a keyword reserved for future use.)
+ * @deprecated Use setAttribute('layout', ...) instead.
*/
function setLayout ( layoutobj ){
-
+ this.layout = layoutobj;
if (!this.isinited) {
this.__LZstoreAttr( layoutobj , "layout" );
return;
@@ -1130,8 +1131,10 @@
* fontstyle) will cascade down the runtime view hierarchy.
* @access private
* @param String val: The value for the new font name
+ * @deprecated Use setAttribute('font', ...) instead.
*/
function setFontName ( val ,prop = null){
+ this.font = val;
this.fontname = val ;
// Canvas has no sprite
if (! this.sprite) {
@@ -1439,7 +1442,7 @@
* a datapath and there are no matching data nodes in its dataset.
*
* @param String amVisible: visibility of view
- * @access private
+ * @deprecated Use setAttribute('visibility', ...) instead.
*/
function setVisibility( amVisible ) {
if (this.visibility == amVisible) return;
@@ -1489,6 +1492,7 @@
* the new width, then the width is unset, and the width of the view will be
* the size of its contents.
* @param Number v: The new value for the width
+ * @deprecated Use setAttribute('width', ...) instead.
*/
function setWidth ( v ){
if (this._width != v) {
@@ -1538,6 +1542,7 @@
* 'null' is given for the new height, then the height is unset, and the height
* of the view will be the size measured of its contents.
* @param Number v: The new value for the height
+ * @deprecated Use setAttribute('height', ...) instead.
*/
function setHeight ( v ){
if (this._height != v) {
@@ -1584,6 +1589,7 @@
* Sets the opacity for the view. The opacity is a number between 0.0
* (transparent) and 1.0 (opaque).
* @param Number v: The new value for the opacity
+ * @deprecated Use setAttribute('opacity', ...) instead.
*/
function setOpacity ( v ){
if (this.capabilities.opacity) {
@@ -1661,6 +1667,7 @@
/**
* Sets the <attribute>rotation</attribute> for the view to the given value.
* @param Number v: The new value for <attribute>rotation</attribute>.
+ * @deprecated Use setAttribute('rotation', ...) instead.
*/
function setRotation ( v ){
if (this.capabilities.rotation) {
@@ -1693,6 +1700,7 @@
*
* @param String align: The <attribute>alignment</attribute> for the
* view. This is one of "left", "center", and "right"
+ * @deprecated Use setAttribute('align', ...) instead.
*
* @devnote TODO: [2008-02-07 ptw] Apparently we never supported
* 'onalign', should we?
@@ -1742,6 +1750,7 @@
/**
* Sets the x offset
* @param Integer o: The x offset
+ * @deprecated Use setAttribute('xoffset', ...) instead.
*/
function setXOffset ( o ){
this.__LZhasoffset = o != 0;
@@ -1754,6 +1763,7 @@
/**
* Sets the Y offset
* @param Integer o: The y offset
+ * @deprecated Use setAttribute('yoffset', ...) instead.
*/
function setYOffset ( o ){
this.__LZhasoffset = o != 0;
@@ -1845,6 +1855,7 @@
*
* @param String valign: The vertical alignment for the view. This is
* one of "top", "middle", and "bottom"
+ * @deprecated Use setAttribute('valign', ...) instead.
*
* @devnote TODO: [2008-02-07 ptw] Apparently we never supported
* 'onvalign', should we?
@@ -1896,6 +1907,7 @@
* view or subview resources. Use the view method
* <method>setColorTransform</method> to tint a view.
* @param Integer c: A color in rgb format; for example, 0xff0000 is red.
+ * @deprecated Use setAttribute('fgcolor', ...) instead.
*/
function setColor ( c ){
this.sprite.setColor(c);
@@ -2516,6 +2528,7 @@
* movieclip frames.
*
* @param Integer n: the number of the resource to show
+ * @deprecated Use setAttribute('frame', ...) instead.
*/
function setResourceNumber( n ) {
//Debug.write('setResourceNumber', n, this, this.playing)
@@ -2574,6 +2587,7 @@
/**
* Gives the view a bgcolor that is the same size as the view.
* @param Integer bgc: The 0-FFFFFF number to be used for the new background color.
+ * @deprecated Use setAttribute('bgcolor', ...) instead.
*/
function setBGColor ( bgc ) {
bgc = lz.Utils.hextoint(bgc);
@@ -2631,6 +2645,7 @@
/**
* Makes a view clickable or not clickable.
* @param Boolean amclickable: Boolean indicating the view's clickability
+ * @deprecated Use setAttribute('clickable', ...) instead.
*/
function setClickable ( amclickable ){
this.sprite.setClickable(amclickable);
@@ -2644,6 +2659,7 @@
* Sets the cursor to the given resource when the mouse is over this view
* @param String cursor: The name of the resource to use as a cursor when it is over
* this view. Or '' for default cursor.
+ * @deprecated Use setAttribute('cursor', ...) instead.
*/
function setCursor ( cursor ){
this.sprite.setCursor(cursor);
@@ -2653,6 +2669,7 @@
/**
* Start or stop playing the attached resource.
* @param Boolean b: If true, starts playing, otherwise stops
+ * @deprecated Use setAttribute('play', ...) instead.
*/
function setPlay (b){
if ( b ) {
@@ -2848,8 +2865,10 @@
* Shows or hides the hand cursor for this view.
* @param Boolean s: true shows the hand cursor for this view, false hides
* it
+ * @deprecated Use setAttribute('showhandcursor', ...) instead.
*/
function setShowHandCursor ( s ){
+ this.showhandcursor = s;
this.sprite.setShowHandCursor(s);
}
@@ -2867,9 +2886,11 @@
/**
* Activate/inactivate children for accessibility
* @param Boolean s: If true, activate the current view and all of its children
+ * @deprecated Use setAttribute('aaactive', ...) instead.
*/
function setAAActive ( s ){
if (this.capabilities.accessibility) {
+ this.aaactive = s;
this.sprite.setAAActive(s);
} else if ($debug) {
this.__warnCapability('view.setAAActive()');
@@ -2880,9 +2901,11 @@
/**
* Set accessibility name
* @param string s: Sets the accessibility name for this view
+ * @deprecated Use setAttribute('aaname', ...) instead.
*/
function setAAName ( s ){
if (this.capabilities.accessibility) {
+ this.aaname = s;
this.sprite.setAAName(s);
} else if ($debug) {
this.__warnCapability('view.setAAName()');
@@ -2892,9 +2915,11 @@
/**
* Set accessibility description
* @param string s: Sets the accessibility description for this view
+ * @deprecated Use setAttribute('aadescription', ...) instead.
*/
function setAADescription ( s ){
if (this.capabilities.accessibility) {
+ this.aadescription = s;
this.sprite.setAADescription(s);
} else if ($debug) {
this.__warnCapability('view.setAADescription()');
@@ -2904,9 +2929,11 @@
/**
* Set accessibility tab order
* @param number s: The tab order index for this view. Must be a unique number.
+ * @deprecated Use setAttribute('aatabindex', ...) instead.
*/
function setAATabIndex ( s ){
if (this.capabilities.accessibility) {
+ this.aatabindex = s;
this.sprite.setAATabIndex(s);
} else if ($debug) {
this.__warnCapability('view.setAATabIndex()');
@@ -2917,9 +2944,11 @@
* Set accessibility silencing/unsilencing
* @param string s: If true, this view is made silent to the screen reader.
* If false, it is active to the screen reader.
+ * @deprecated Use setAttribute('aasilent', ...) instead.
*/
function setAASilent ( s ){
if (this.capabilities.accessibility) {
+ this.aasilent = s;
this.sprite.setAASilent(s);
} else if ($debug) {
this.__warnCapability('view.setAASilent()');
@@ -3032,6 +3061,7 @@
* Sets a proxy policy function on a per-view basis.
*
* @param Object f: If a string, use as a URL to the proxy server. If a function, it should take a URL of a resource, and return the URL of the proxy server to use to load that resource.
+ * @deprecated Use setAttribute('proxyurl', ...) instead.
*/
function setProxyURL ( f ){
this.proxyurl = f;
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzInputText.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -220,6 +220,7 @@
/**
* Sets whether user can modify input text field
* @param Boolean enabled: true if the text field can be edited
+ * @deprecated Use setAttribute('enabled', ...) instead.
*/
function setEnabled (enabled){
this.setAttribute('focusable', enabled);
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-07-17 17:58:33 UTC (rev 10402)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LzText.lzs 2008-07-17 19:27:54 UTC (rev 10403)
@@ -525,6 +525,7 @@
/**
* @access private
* Set the maximum number of chars a textfield can contain
+ * @deprecated Use setAttribute('maxlength', ...) instead.
*/
function setMaxLength ( val ){
if (val == null || val == '') return;
@@ -542,6 +543,7 @@
/**
* @access private
* Set the pattern of chars a textfield can contain
+ * @deprecated Use setAttribute('pattern', ...) instead.
*/
function setPattern ( val ){
if (val == null || val == '') return;
@@ -655,6 +657,7 @@
* @param Number n: set the left edge of the textfield to offset
* n pixels
* (n is always < 0)
+ * @deprecated Use setAttribute('xscroll', ...) instead.
*/
function setXScroll ( n ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
@@ -667,6 +670,7 @@
* Set the y scroll position of the textfield.
* @param Number n: set the top line of the textfield to offset n pixels
* vertically (n is always < 0)
+ * @deprecated Use setAttribute('yscroll', ...) instead.
*/
function setYScroll ( n ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
@@ -783,6 +787,7 @@
/**
* Sets the text of the field to display
* @param String t: the string to which to set the text
+ * @deprecated Use setAttribute('text', ...) instead.
*/
function setText ( t, force = null){
// force to a string
@@ -887,6 +892,7 @@
/**
* Sets the selectability (with Ibeam cursor) of the text field
* @param Boolean isSel: true if the text may be selected by the user
+ * @deprecated Use setAttribute('selectable', ...) instead.
*/
function setSelectable ( isSel ){
this.selectable = isSel;
@@ -907,6 +913,7 @@
/**
* @access private
+ * @deprecated Use setAttribute('fontsize', ...) instead.
*/
function setFontSize ( fsize ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
@@ -918,6 +925,7 @@
/**
* @access private
+ * @deprecated Use setAttribute('fontstyle', ...) instead.
*/
function setFontStyle ( fstyle ){
var tsprite:LzTextSprite = (this.sprite cast LzTextSprite);
@@ -970,6 +978,7 @@
* Sets what type of antialiasing the text field should use. Only works in swf8
* and higher.
* @param String aliasType: "normal" or "advanced"
+ * @deprecated Use setAttribute('antiAliasType', ...) instead.
*/
function setAntiAliasType( aliasType ){
if (this.capabilities.advancedfonts) {
@@ -1001,6 +1010,7 @@
* Sets what type of grid fitting the text field should use.
* Only works in swf8 and higher.
* @param String gridFit: "none", "pixel", or "subpixel"
+ * @deprecated Use setAttribute('gridFit', ...) instead.
*/
function setGridFit( gridFit ){
if (this.capabilities.advancedfonts) {
@@ -1033,6 +1043,7 @@
* Sets the sharpness for the text rendering
* Only works in swf8 and higher.
* @param Number sharpness: -400 to 400
+ * @deprecated Use setAttribute('sharpness', ...) instead.
*/
function setSharpness( sharpness ){
if (this.capabilities.advancedfonts) {
@@ -1065,6 +1076,7 @@
* Sets the thickness for the text rendering
* Only works in swf8 and higher.
* @param Number thickness: -200 to 200
+ * @deprecated Use setAttribute('thickness', ...) instead.
*/
function setThickness( thickness ){
if (this.capabilities.advancedfonts) {
More information about the Laszlo-checkins
mailing list