Author: hqm Date: 2008-03-21 11:57:54 -0700 (Fri, 21 Mar 2008) New Revision: 8341
Modified: openlaszlo/branches/devildog/ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataProvider.lzs openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs openlaszlo/branches/devildog/demos/lzpix/app.lzx openlaszlo/branches/devildog/lps/components/base/baseslider.lzx openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx openlaszlo/branches/devildog/lps/components/utils/replicator/replicator.lzx openlaszlo/branches/devildog/test/components/base/lzunit-basetabs.lzx Log: Merged revisions 8324-8340 via svnmerge from http://svn.openlaszlo.org/openlaszlo/trunk ....... r8329 | ptw | 2008-03-20 08:32:55 -0400 (Thu, 20 Mar 2008) | 16 lines Change 20080320-ptw-s by [EMAIL PROTECTED] on 2008-03-20 08:08:29 EDT in /Users/ptw/OpenLaszlo/ringding-clean for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix stale lzunit test Bugs Fixed: LPP-5638 'ant runlzunit failson components/base/lzunit-basetabs.lzx in swf7' Technical Reviewer: max (pending) QA Reviewer: mamye (pending) Tests: Test passes now ....... r8331 | max | 2008-03-20 13:29:57 -0400 (Thu, 20 Mar 2008) | 24 lines Change 20080319-maxcarlson-g by [EMAIL PROTECTED] on 2008-03-19 22:29:00 PDT in /Users/maxcarlson/openlaszlo/trunk-clean for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix slider New Features: Bugs Fixed: LPP-5570 - Circular constraints break swf instantiation Technical Reviewer: ptw QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: Applying the change from r8210. The good news is, it fails consistently in dhtml and swf now! Tests: See LPP-5570 ....... r8332 | max | 2008-03-20 13:30:58 -0400 (Thu, 20 Mar 2008) | 24 lines Change 20080319-maxcarlson-f by [EMAIL PROTECTED] on 2008-03-19 21:59:08 PDT in /Users/maxcarlson/openlaszlo/trunk-clean for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Fix selection in lzpix New Features: Bugs Fixed: LPP-5642 - Can't drag to select photos in lzpix after r8279 Technical Reviewer: promanik QA Reviewer: hminsky Doc Reviewer: (pending) Documentation: Release Notes: Details: Fix bad classname lookup. Tests: Run demos/lzpix/app.lzx?lzt=html&lzr=dhtml and load a series of photos. With this change, you won't see an error in firebug. ....... r8333 | hqm | 2008-03-20 15:38:43 -0400 (Thu, 20 Mar 2008) | 30 lines Change 20080320-hqm-v by [EMAIL PROTECTED] on 2008-03-20 13:00:00 EDT in /Users/hqm/openlaszlo/trunk4 for http://svn.openlaszlo.org/openlaszlo/trunk Summary: replace applyConstraint in gridtext.lzx New Features: Bugs Fixed: Technical Reviewer: andre,ptw QA Reviewer: (pending) Doc Reviewer: (pending) Documentation: Release Notes: Details: applyConstraint is deprecated, this replaces the usage with an equivalent method in an event handler on 'onwidth' Tests: grid example (broken currently due to something else with states, this just gets rid of warning from applyConstraint) ....... r8334 | hqm | 2008-03-20 15:41:09 -0400 (Thu, 20 Mar 2008) | 24 lines Change 20080320-hqm-4 by [EMAIL PROTECTED] on 2008-03-20 15:40:37 EDT in /Users/hqm/openlaszlo/trunk4 for http://svn.openlaszlo.org/openlaszlo/trunk Summary: update doc comments for LzDataProvider New Features: Bugs Fixed: Technical Reviewer: liorio QA Reviewer: (pending) Doc Reviewer: (pending) Documentation: Release Notes: Details: Tests: ....... r8338 | max | 2008-03-20 20:46:28 -0400 (Thu, 20 Mar 2008) | 28 lines Change 20080320-maxcarlson-I by [EMAIL PROTECTED] on 2008-03-20 13:19:40 PDT in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: UPDATED: Fix replicators, view and canvas cleanup New Features: Bugs Fixed: LPP-5641 - replicator broken after r8279 Technical Reviewer: ptw QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: LaszloView.lzs - Per Tucker's suggestions, set _ignoreAttribute for args.stretches to avoid duplicate calls to stretchResource(). Clean up early resource setter. Fix clip and stretches with constraint expressions. Add Debug.deprecated() calls for @deprecated methods. Moved setVisible(), setResource() and stretchResource() method bodies to $lzc$set_... and replaced original methods with a warning and trampoline to the setter method. Call $lzc$set_... methods instead of deprecated setVisible(), setResource() and stretchResource(). Remove tests for if (this.sprite). LaszloCanvas.lzs - UNCHANGED: Update __LZcallInit to match LzNode. Update comment on sprite init() replicator.lzx - UNCHANGED: Copy first slot of array instead of using pop() to preserve state of children array. Add setter method for setNodes - can no longer use setters.nodes. Tests: trunk/test/style/metasuite.lzx?lzr=swf8&debug=true passes, trunk/test/explicit-replicators/lazy-replicator.lzx and trunk/test/explicit-replicators/lazy-replicator.lzx ....... r8339 | max | 2008-03-20 20:49:39 -0400 (Thu, 20 Mar 2008) | 29 lines Change 20080320-maxcarlson-e by [EMAIL PROTECTED] on 2008-03-20 16:21:39 PDT in /Users/maxcarlson/openlaszlo/trunk for http://svn.openlaszlo.org/openlaszlo/trunk Summary: Clean up LaszloView and the swf7-8 sprites New Features: Bugs Fixed: LPP-5649 - LaszloView and the swf sprite should not return movieclip references Technical Reviewer: hminsky QA Reviewer: promanik Doc Reviewer: (pending) Documentation: Release Notes: Details: LzTextSprite.as - Use movieclip reference directly instead of relying on return value of makeContainerResource(). LzInputTextSprite.as - Use movieclip reference directly instead of relying on return value of makeContainerResource(). LzSprite.as - Don't return references to the container movieclip in setResource() or makeContainerResource(). LaszloView.lzs - Clean up setResource(). Document _resource property. Tests: All applications run as before in swf and dhtml. ....... Property changes on: openlaszlo/branches/devildog ___________________________________________________________________ Name: svnmerge-integrated - /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-8323 + /openlaszlo/branches/wafflecone:1-5746,5818-6068,6070-6205,6207-6213,6216-6265,6267-6368,6370-6431,6433-6450,6497 /openlaszlo/trunk:1-8340 Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataProvider.lzs =================================================================== (Binary files differ) Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzDataRequest.lzs 2008-03-21 18:57:54 UTC (rev 8341) @@ -16,6 +16,7 @@ * </p> * <event>onstatus</event>: Sent as data or other conditions occur during the execution of this request. * + * * @shortdesc An abstract class to represent data requests. * @lzxname datarequest */ @@ -26,7 +27,7 @@ * @modifiers override */ static var tagname = 'datarequest'; -/** @access private */ + /** @access private */ static var attributes = new LzInheritedHash(LzNode.attributes); /* Status value constants */ @@ -37,12 +38,22 @@ var requestor = null; + /** An object which holds the protocol-specific source to load data from + @type Object + */ var src = null; + /** The timeout in milliseconds + @type Number + */ var timeout = Infinity; + /** The status, one of 'success', 'timeout', 'error', or 'ready' + @type String + */ var status = null; + /** Raw data returned by request */ var rawdata = null; - // Used by dataprovider to record error messages + /** Used by dataprovider to record error messages */ var error = null; /** @lzxtype event */ Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/data/LzHTTPDataProvider.lzs 2008-03-21 18:57:54 UTC (rev 8341) @@ -13,8 +13,17 @@ * <p> * <class>LzHTTPDataProvider</class> implements the DataProvider interface, to support HTTP data requests. * </p> + * <p> + * Requests are submitted using the <method>doRequest</method>, passing a request + * object of type <class>LzHTTPDataRequest</class>. And instance of <class>LzHTTPDataProvider</class> is the default + * data provider for the runtime, and is what is used by <class>LzDataset</class> to load data. + * </p> + * <p> + * <event>onstatus</event>: Sent to a datarequest to update the status of the request.</p> + * * @shortdesc DataProvider which implements HTTP request transport * @lzxname httpdataprovider + * */ @@ -290,6 +299,7 @@ * <p> * <class>LzHTTPDataRequest</class> implements the DataProvider interface, to support HTTP data requests. * </p> + * * @shortdesc A class to represent HTTP data requests. * @lzxname httpdatarequest */ @@ -303,23 +313,49 @@ var multirequest = false; var queuerequests = false; + /** An LzParams object which holds query key-value pairs. + @type LzParam + */ var queryparams = null; // : LzParam object + /** An LzParams object which holds HTTP request headers as key-value pairs. + @type LzParam + */ var requestheaders = null; // : LzParam object + /** Flag to say whether proxied server should return with HTTP response metadata added. + @type Boolean + */ var getresponsheaders = false; - var responseheaders = null; // : LzParam object, returned by dataprovider + /** An LzParams object which holds HTTP response headers + @type LzParam + */ + var responseheaders = null; + /** Flag to say whether data is cacheable at the server + @type Boolean + */ var cacheable = false; + /** Flag to say whether data is cacheable at the client (browser) + @type Boolean + */ var clientcacheable = null; + /** Flag to say whether whitespace should be trimmed from text element data in returned XML data + @type Boolean + */ var trimwhitespace = false; + /** Flag to say whether namespace prefixes on element and attribute names is preserved in XML data + @type Boolean + */ var nsprefix = false; /** The LZX DOM element containing the loaded data */ var xmldata = null; - // time it took to load + /** Time taken by load, in milliseconds + @type Number + */ var loadtime = 0; var secure = false; @@ -327,6 +363,7 @@ // private, pointer to our lzhttploader + /** @access private */ var loader = null; } Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzInputTextSprite.as 2008-03-21 18:57:54 UTC (rev 8341) @@ -34,7 +34,9 @@ //////////////////////////////////////////////////////////////// this.masked = true; - var mc = this.makeContainerResource(); + this.makeContainerResource(); + var mc = this.__LZmovieClipRef; + // create the textfield on container movieclip - give it a unique name var txtname = '$LzText'; mc.createTextField( txtname, 1, 0, 0, 100, 12 ); Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2008-03-21 18:57:54 UTC (rev 8341) @@ -299,9 +299,6 @@ } this.resource = resourceName; - - // button appears to require this return value!!! - return this.__LZmovieClipRef; } @@ -341,7 +338,7 @@ */ LzSprite.prototype.makeContainerResource = function ( ) { //Debug.write('LzSprite.makeContainerResource'); - return this.setResource( "empty" ); + this.setResource( "empty" ); } /** Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/kernel/swf/LzTextSprite.as 2008-03-21 18:57:54 UTC (rev 8341) @@ -32,7 +32,9 @@ //////////////////////////////////////////////////////////////// this.masked = true; - var mc = this.makeContainerResource(); + this.makeContainerResource(); + var mc = this.__LZmovieClipRef; + // create the textfield on container movieclip - give it a unique name var txtname = '$LzText'; mc.createTextField( txtname, 1, 0, 0, 100, 12 ); Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloCanvas.lzs 2008-03-21 18:57:54 UTC (rev 8341) @@ -494,7 +494,8 @@ this.isinited = true; this.__LZresolveReferences(); - if (this.__LZstyleConstraints) this.__LZapplyStyleConstraints(); + + // Install computed initializations var sl = this.subnodes; if (sl) { var i = 0; @@ -525,7 +526,7 @@ } this.init(); - // Canvas-only: Why? TODO: [2008-02-01 ptw] Ask max + // Canvas-only: This is so the canvas sprite knows when to show its children this.sprite.init(true); if (this.oninit.ready) this.oninit.sendEvent( this ); if (this.datapath && this.datapath.__LZApplyDataOnInit) { Modified: openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs =================================================================== --- openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/WEB-INF/lps/lfc/views/LaszloView.lzs 2008-03-21 18:57:54 UTC (rev 8341) @@ -349,20 +349,17 @@ this.__LZcheckheight = false; } - var r =null; + if ('clip' in args && args['clip'] && (! (args.clip instanceof LzInitExpr)) ){ + this.makeMasked(); + } + if ('stretches' in args && args['stretches'] != null && (! (args.stretches instanceof LzInitExpr)) ){ + this.$lzc$set_stretches(args.stretches); + args.stretches = LzNode._ignoreAttribute; + } if ('resource' in args && args['resource'] != null && (! (args.resource instanceof LzInitExpr)) ){ - r = args.resource; + this.$lzc$set_resource( args.resource ); args.resource = LzNode._ignoreAttribute; } - if ('clip' in args && args['clip']){ - if (this.sprite) this.makeMasked(); - } - if (args['stretches']){ - if (this.sprite) this.stretchResource(args.stretches); - } - if ( r != null ){ - if (this.sprite) this.setResource( r ); - } if($debug){ if( 'valign' in args && args['valign'] && 'y' in args && args['y']){ Debug.warn("y attribute ignored; superseded by valign constraint."); @@ -479,7 +476,6 @@ function $lzc$set_opacity(v) { this.setOpacity(v); } /** @access private */ function $lzc$set_alpha(v) { this.setOpacity(v); } -function $lzc$set_visible(v) { this.setVisible(v) } /** @access private */ function $lzc$set_visibility(v) { this.setVisibility(v) } @@ -527,7 +523,6 @@ * @type String */ var resource; -function $lzc$set_resource(v) { this.setResource(v) } /** If true, this view intercepts click events; otherwise they are passed * to its container. This defaults to true if the view defines a mouse @@ -590,7 +585,6 @@ * @lzxdefault "none" */ var stretches = "none"; -function $lzc$set_stretches(v) { this.stretchResource(v); } /** If true, the resource attached to this view begins playing when * the view is instantiated. * @lzxtype boolean @@ -1067,6 +1061,7 @@ * @deprecated */ function releaseLayouts( ) { + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); if (this.layouts) { for ( var i = this.layouts.length - 1; i >= 0; i-- ){ this.layouts[ i ].releaseLayout(); @@ -1075,39 +1070,33 @@ } /** + * @access private + * Can be nulled by unload() to allow the same resource to be loaded again with setResource() + */ +var _resource = null; + +/** * This method associates a view with a named library element. If the * view's <attribute>isVisible</attribute> property is true, the * resource will be displayed when it is attached * + * @deprecated Use setAttribute('stretches', ...) instead. * @param String resourceName: a string naming the id of the resource to attach */ -function setResource ( resourceName ) { +function setResource(v) { + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); + this.$lzc$set_resource(v); +} + +function $lzc$set_resource( resourceName ) { if (resourceName == null || resourceName == this._resource) return; - /*if (LzLoader.__LZmonitorState) { - Debug.monitor(this, 'isloaded'); - Debug.monitor(this, 'play'); - Debug.monitor(this, 'playing'); - Debug.monitor(this, '__LZtracking'); - //Debug.monitor(this, '__lzcheckframe'); - } - if ( resourceName.indexOf('http:') == 0 || resourceName.indexOf('https:') == 0 ){ - this.setSource( resourceName ); - return; - } - //Debug.write(this.sprite); - */ + this.resource = this._resource = resourceName; if (resourceName != 'empty') this.sprite.setResource(resourceName); this.__LZhaser = resourceName == "empty"; - this.resource = resourceName; if (this.onresource.ready) this.onresource.sendEvent( resourceName ); - - this._resource = this.resource; - - // button appears to require this return value!!! - return this.sprite.__LZmovieClipRef; } /** @@ -1232,7 +1221,7 @@ //this.__LZFinishDestroyOnIdle(); - this.setVisible ( false ); + this.$lzc$set_visible ( false ); if ( this.addedToParent ){ if ( ('__LZoutliewidth' in this.immediateparent) && (this.immediateparent.__LZoutliewidth == this) ) { @@ -1280,8 +1269,14 @@ * @param Boolean|Null amVisible: Controls the visibility of a view. * `true` makes the view visible, `false` makes the view hidden, * `null` will make the view visible only if it has a data binding. + * @deprecated Use setAttribute('visible', ...) instead. */ -function setVisible( amVisible ) { +function setVisible(v) { + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); + this.$lzc$set_visible(v) +} + +function $lzc$set_visible( amVisible ) { if (this._visible == amVisible) return; this._visible = amVisible; @@ -1837,6 +1832,7 @@ * @deprecated use the width attribute directly */ function getWidth (){ + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); return this.width; } @@ -1846,6 +1842,7 @@ * @deprecated use the height attribute directly */ function getHeight (){ + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); return this.height; } @@ -2360,10 +2357,16 @@ * the coordinate system for all children of this view, so use this method * with care. * + * @deprecated Use setAttribute('stretches', ...) instead. * @param String stretch: Set the resource to stretch only in the given axis ("width" or * "height") or in both axes ("both"). */ -function stretchResource ( stretch ){ +function stretchResource(v) { + if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute); + this.$lzc$set_stretches(v); +} + +function $lzc$set_stretches( stretch ){ if (!(stretch == "none" || stretch == "both" || stretch == "width" || stretch == "height")) { //TODO: Remove null, x, y options from here when components are moved var newstretch = (stretch == null ? "both" : stretch == "x" ? "width" : stretch == "y" ? "height" : "none"); @@ -2372,6 +2375,8 @@ this, arguments.callee, stretch, this, arguments.callee, newstretch); } stretch = newstretch; + } else if (this.stretches == stretch) { + return; } this.stretches = stretch; @@ -2429,14 +2434,14 @@ * @access private */ function makeMasked ( ){ - if (this.sprite) this.sprite.setClip(true); + this.sprite.setClip(true); this.masked = true; this.mask = this; } /** @access private */ function removeMask () { - if (this.sprite) this.sprite.setClip(false); + this.sprite.setClip(false); this.masked = false; this.mask = null; } Modified: openlaszlo/branches/devildog/demos/lzpix/app.lzx =================================================================== --- openlaszlo/branches/devildog/demos/lzpix/app.lzx 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/demos/lzpix/app.lzx 2008-03-21 18:57:54 UTC (rev 8341) @@ -318,7 +318,7 @@ } for ( var i = subviews.length-1; i >=0; i-- ){ var sv = subviews[ i ]; - if ( ! ( sv instanceof photo ) ) continue; + if ( ! ( sv instanceof lz.photo ) ) continue; if ( sv.intersectsRectangle( x1, y1, x2 , y2 ) ){ selman.select( sv ); } Modified: openlaszlo/branches/devildog/lps/components/base/baseslider.lzx =================================================================== --- openlaszlo/branches/devildog/lps/components/base/baseslider.lzx 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/lps/components/base/baseslider.lzx 2008-03-21 18:57:54 UTC (rev 8341) @@ -229,6 +229,7 @@ onmousedown="thedragstate.apply();" onmouseup="thedragstate.remove();" focusable="false" + x="0" y="${(parent.height-height)/2}" > Modified: openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx =================================================================== --- openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/lps/components/lz/gridtext.lzx 2008-03-21 18:57:54 UTC (rev 8341) @@ -7,7 +7,7 @@ is displayed in the rows. --> <attribute name="datapath" setter="this.setAttribute( 'rowdp', datapath )"/> - <!--- type of content's alignment. Default: left + <!--- type of content''s alignment. Default: left possible values are: left, center, right --> <attribute name="textalign" type="string" value="left"/> <!--- Whether one is able to select the text. (Only applies @@ -76,38 +76,26 @@ <handler name="oninit"> <![CDATA[ this.setAttribute('selectable', classroot.selectable); - var f = function() { - this.setAttribute("x", this._calcX()); - } - var d = [this, "width"]; - this.applyConstraint("x", f, d); ]]> </handler> - <handler name="ontext" args="val"> - <![CDATA[ - this.setAttribute("x", this._calcX()); - ]]> + <handler name="ontext" method="_setCalcX" /> + <handler name="onwidth" method="_setCalcX" /> - </handler> + <method name="_setCalcX"><![CDATA[ + if (classroot.textalign == "center") { + var x = ((this.width /2) - (this.getTextWidth() /2)); + if (x < 0) x = 0; + this.setAttribute("x", x); + } else if (classroot.textalign == "right") { + var x = ((this.width) - (this.getTextWidth() + 10)); + if (x < 0) x = 0; + this.setAttribute("x", x); + } else { + this.setAttribute("x", 0); + } + ]]></method> - <method name="_calcX"> - <![CDATA[ - if (classroot.textalign == "center"){ - var x = ((this.width /2) - (this.getTextWidth() /2)); - if (x < 0) x = 0; - return x; - } - else if (classroot.textalign == "right"){ - var x = ((this.width) - (this.getTextWidth() + 10)); - if (x < 0) x = 0; - return x; - } - else{ - return 0; - } - ]]> - </method> </text> <state pooling="true" apply="${parent.editing}" Modified: openlaszlo/branches/devildog/lps/components/utils/replicator/replicator.lzx =================================================================== --- openlaszlo/branches/devildog/lps/components/utils/replicator/replicator.lzx 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/lps/components/utils/replicator/replicator.lzx 2008-03-21 18:57:54 UTC (rev 8341) @@ -1,4 +1,4 @@ -<!-- Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. --> +<!-- Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. --> <library> <!--- This is a declared replicator for visual elements. Unlike OpenLaszlo''s data-replication feature, a replicator can take an @@ -160,10 +160,9 @@ // @keywords private function createChildren (c) { super.createChildren( [] ); - this.replicated = c.pop(); + this.replicated = c[0]; - //Debug.write( 'replicated', replicated ); - if ( c.length ) { + if ( c.length > 1 ) { Debug.warn("%s: only a single child view is replicated", this); this.container.createChildren( c ); } else { @@ -176,7 +175,7 @@ /** * @access private */ - setters.nodes = "setNodes"; + function $lzc$set_nodes(n) { this.setNodes(n) } // Replicate over the given list of elements // @param Array n: The list of elements over which to replicate @@ -274,7 +273,6 @@ // @keywords private function _makeClone () { - var v = this.container.makeChild( this.replicated ); v.setAttribute( "clonenumber", null ); // emulate datapath behavior Modified: openlaszlo/branches/devildog/test/components/base/lzunit-basetabs.lzx =================================================================== --- openlaszlo/branches/devildog/test/components/base/lzunit-basetabs.lzx 2008-03-21 02:11:13 UTC (rev 8340) +++ openlaszlo/branches/devildog/test/components/base/lzunit-basetabs.lzx 2008-03-21 18:57:54 UTC (rev 8341) @@ -32,15 +32,15 @@ </tabs> <method name="testTabClassImplicit"> - assertEquals('tab', tabs0.bar.subviews[0].constructor.classname); + assertEquals('tab', tabs0.bar.subviews[0].constructor.tagname); </method> <method name="testTabClassDirect"> - assertEquals('ptab', tabs1.bar.subviews[0].constructor.classname); + assertEquals('ptab', tabs1.bar.subviews[0].constructor.tagname); </method> <method name="testTabClassInherited"> - assertEquals('ptab', tabs2.bar.subviews[0].constructor.classname); + assertEquals('ptab', tabs2.bar.subviews[0].constructor.tagname); </method> </TestCase> @@ -97,7 +97,7 @@ </canvas> <!-- * X_LZ_COPYRIGHT_BEGIN *************************************************** -* Copyright 2006 Laszlo Systems, Inc. All Rights Reserved. * +* Copyright 2006, 2008 Laszlo Systems, Inc. All Rights Reserved. * * Use is subject to license terms. * * X_LZ_COPYRIGHT_END ****************************************************** --> <!-- @LZX_VERSION@ --> _______________________________________________ Laszlo-checkins mailing list [email protected] http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins
