History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-4433
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Max Carlson
Reporter: André Bargull
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

Better performance for <basetrackgroup>

Created: 04/Aug/07 06:24 AM   Updated: 20/Aug/07 05:30 PM
Component/s: Components - base
Affects Version/s: 4.0.3
Fix Version/s: 4.0.5WaffleCone

Time Tracking:
Not Specified

File Attachments: 1. File basetrackgroup.lzx (11 kb)


Severity: Minor
Fixed in Change#: 6,160
Runtime: N/A
Flags: External
Fix in hand: True


 Description  « Hide
Summary:
- better performance for "basetrackgroup#destroy(..)"
- replaces "onconstruct" with "construct(..)" and "oninit" with "init()"

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
André Bargull - 04/Aug/07 06:24 AM
Attached "basetrackgroup.lzx"

Max Carlson - 20/Aug/07 05:30 PM
Author: max
Date: 2007-08-20 17:28:38 -0700 (Mon, 20 Aug 2007)
New Revision: 6160

Modified:
   openlaszlo/branches/wafflecone/lps/components/base/basetrackgroup.lzx
Log:
Change 20070820-maxcarlson-Q by maxcarlson@plastik on 2007-08-20 15:06:50 PDT
    in /Users/maxcarlson/openlaszlo/wafflecone
    for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone

Summary: Better performance for <basetrackgroup>

New Features:

Bugs Fixed: LPP-4433 - Better performance for <basetrackgroup>

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

Documentation:

Release Notes:

Details: Applied changes per LPP-4433.
    

Tests: All tests in wafflecone/test/lfc/lztrack/ pass in swf and dhtml.



Modified: openlaszlo/branches/wafflecone/lps/components/base/basetrackgroup.lzx
===================================================================
--- openlaszlo/branches/wafflecone/lps/components/base/basetrackgroup.lzx 2007-08-20 22:17:23 UTC (rev 6159)
+++ openlaszlo/branches/wafflecone/lps/components/base/basetrackgroup.lzx 2007-08-21 00:28:38 UTC (rev 6160)
@@ -54,15 +54,57 @@
         <event name="onmousetrackoutleft" />
 
         <!--- @keywords private -->
- <handler name="onconstruct">
+ <method name="construct">
+ super.construct.apply(this, arguments);
+
             this._activateDL = new LzDelegate(this,'activateTrackgroup');
             this._deactivateDL = new LzDelegate(this,'deactivateTrackgroup');
             this._repeattrackDL = new LzDelegate(this,'trackingout');
             this._destroyDL = new LzDelegate(this,'destroyitem');
             this._trackgroup = "tg" + this.getUID();
             this._boundstrackgroup = "btg" + this.getUID();
- </handler>
+ </method>
+
+ <!--- @keywords private -->
+ <method name="init" >
+ super.init.apply(this, arguments);
+
+ LzTrack.register( this.boundsref, this._boundstrackgroup );
+ </method>
+
+ <!--- @keywords private -->
+ <method name="destroy" ><![CDATA[
+ this.setTracking(false);
 
+ //LzTrack.unregisterAll(this._trackgroup);//LPP-4429: we would call this if it was implemented
+ LzTrack.unregister(this.boundsref, this._boundstrackgroup);
+
+ if (_destroyDL in this) {
+ this._destroyDL.unregisterAll();
+ delete this._destroyDL;
+ }
+
+ if (_activateDL in this) {
+ this._activateDL.unregisterAll();
+ delete this._activateDL;
+ }
+
+ if (_deactivateDL in this) {
+ this._deactivateDL.unregisterAll();
+ delete this._deactivateDL;
+ }
+
+ if (_repeattrackDL in this) {
+ this._repeattrackDL.unregisterAll();
+ delete this._repeattrackDL;
+ }
+
+ delete this.activateevents;//improvement for "onremovesubview"
+ delete this.deactivateevents;//improvement for "onremovesubview"
+
+ super.destroy.apply(this, arguments);
+ ]]></method>
+
         <!--- sets the view that will act as the bounds for this trackgroup -->
         <method name="setBoundsRef" args="ref" >
             this.boundsref = ref;
@@ -130,11 +172,6 @@
         ]]>
         </handler>
 
- <!--- @keywords private -->
- <handler name="oninit" >
- LzTrack.register( this.boundsref, this._boundstrackgroup );
- </handler>
-
         <!--- Called when the mouse is down and tracked
               outside the bounding rect defined by boundsref. this method
               generates the onmousetrackoutleft, onmousetrackoutright,


_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins