Author: ptw
Date: 2008-02-28 05:57:33 -0800 (Thu, 28 Feb 2008)
New Revision: 8126

Modified:
   openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
Log:
Change 20080227-ptw-m by [EMAIL PROTECTED] on 2008-02-27 15:45:42 EST
    in /Users/ptw/OpenLaszlo/ringding
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Send ondestroy _before_ marking node as deleted, so it gets
through.

New Features:

Bugs Fixed:
LPP-5462 'ondestroy event not fired in view'

Technical Reviewer: [EMAIL PROTECTED] (Message-ID: <[EMAIL PROTECTED]>)
QA Reviewer: [EMAIL PROTECTED] (pending)

Tests:
    Test case in bug report



Modified: openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs    2008-02-28 13:41:54 UTC 
(rev 8125)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/core/LzNode.lzs    2008-02-28 13:57:33 UTC 
(rev 8126)
@@ -1819,11 +1819,15 @@
     if (this.__LZdeleted == true) {
         return;
     }
+
+    // Must be sent _before_ we mark ourself as deleted, or no
+    // delegates will be executed.  This is our last and final act
+    // before we actually will be destroyed.
+    if (this.ondestroy.ready) this.ondestroy.sendEvent( this );
+
     // To keep delegates from resurrecting us.  See LzDelegate#execute
     this.__LZdeleted = true;
 
-    if (this.ondestroy.ready) this.ondestroy.sendEvent( this );
-
     //don't allow a call on this method if I'm deleted
     this.__LZinstantiationDone = null;
 


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

Reply via email to