Author: ptw
Date: 2008-01-09 09:22:19 -0800 (Wed, 09 Jan 2008)
New Revision: 7786

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
Log:
Change 20080109-ptw-G by [EMAIL PROTECTED] on 2008-01-09 12:11:23 EST
    in /Users/ptw/OpenLaszlo/ringding-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fixing a hole where the rain gets in

Bugs Fixed:
LPP-5337 'Multiframe resource assigned via $style within a view that is init 
stage late runs a bit and gets orphaned in onidle'

Technical Reviewer: max (message://<[EMAIL PROTECTED]>)
QA Reviewer: mdemmon (pending)

Details:
    Consider the case where tracking is stopped before checkPlayStatus
    gets to run: Instead of using callOnIdle, which cannot be
    cancelled, register on onidle, so you can be cancelled.

Tests:
    Test case from bug no longer leaves delegates on idle queue



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as     2008-01-09 
16:36:47 UTC (rev 7785)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as     2008-01-09 
17:22:19 UTC (rev 7786)
@@ -1,7 +1,7 @@
 /**
   * LzSprite.as
   *
-  * @copyright Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
@@ -1309,6 +1309,7 @@
     this.updatePlayStatus();
     this.__LZtracking = false;
     this.updatePlayDel.unregisterAll();
+    this.checkPlayStatusDel.unregisterAll();
 }
 
 
@@ -1364,7 +1365,7 @@
      if (('isaudio' in this.getMCRef()) && (this.getMCRef().isaudio == true)) 
this.__lzskipplaychecklimit = LzSprite.prototype.__lzskipplaychecklimitmax;
     
     //Debug.warn('checkPlayStatus %w %w %w %w', this.__lzcheckframe, 
this.frame, this.totalframes, this.__lzskipplaychecklimit);
-    LzIdle.callOnIdle( this.checkPlayStatusDel );
+    this.checkPlayStatusDel.register( LzIdle, "onidle" );
 }
 
 /**
@@ -1377,11 +1378,10 @@
     this.updatePlayStatus();
     this.__lzskipplaycheck++;
     if (this.__lzskipplaycheck < this.__lzskipplaychecklimit) {
-        LzIdle.callOnIdle( this.checkPlayStatusDel );
         return;
     }
+    this.checkPlayStatusDel.unregisterAll();
 
-
     if ( this.frame != this.__lzcheckframe || this.totalframes != 
this.__lzchecktotalframes){
         //Debug.write('checkPlayStatus2 tracking', this.frame, 
this.__lzcheckframe);
         this.trackPlay();


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

Reply via email to