Author: max
Date: 2007-08-10 08:59:49 -0700 (Fri, 10 Aug 2007)
New Revision: 5997

Modified:
   openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/views/LaszloView.lzs
Log:
Change 20070809-maxcarlson-4 by [EMAIL PROTECTED] on 2007-08-09 21:03:28 PDT
    in /Users/maxcarlson/openlaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Fix view height and width event firing before init

New Features:

Bugs Fixed: LPP-4456 - Idle/wait resource is out of position

Technical Reviewer: promanik
QA Reviewer: ben
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details: Don't reload the same resource or load null resources in 
setResource().  Remove && this.isinited && this.onwidth/height tests in 
updateHeight/Width()
    

Tests: See LPP-4456.



Modified: openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/views/LaszloView.lzs 
2007-08-10 15:51:09 UTC (rev 5996)
+++ openlaszlo/branches/wafflecone/WEB-INF/lps/lfc/views/LaszloView.lzs 
2007-08-10 15:59:49 UTC (rev 5997)
@@ -893,6 +893,7 @@
   * @param String resourceName: a string naming the id of the resource to 
attach
   */
 function setResource ( resourceName ) {
+    if (resourceName == null || resourceName == this._resource) return;
     /*if (LzLoader.__LZmonitorState) {
         Debug.monitor(this, 'isloaded');
         Debug.monitor(this, 'play');
@@ -914,6 +915,8 @@
     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;
 }
@@ -1708,7 +1711,7 @@
     if ( !this.hassetwidth ){
         this.width = newsize;
         this.sprite.setWidth(newsize);
-        if (this.onwidth.ready && this.isinited && this.onwidth) 
this.onwidth.sendEvent( newsize );
+        if (this.onwidth.ready) this.onwidth.sendEvent( newsize );
 
         if (this.immediateparent.__LZcheckwidth)
             this.immediateparent.__LZcheckwidthFunction( this );
@@ -1733,7 +1736,7 @@
     if ( !this.hassetheight ){
         this.height = newsize;
         this.sprite.setHeight(newsize);
-        if (this.onheight.ready && this.isinited && this.onheight) 
this.onheight.sendEvent( newsize );
+        if (this.onheight.ready) this.onheight.sendEvent( newsize );
 
         if (this.immediateparent.__LZcheckheight) 
             this.immediateparent.__LZcheckheightFunction( this );


_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins

Reply via email to