Phil Wallach

I follow where my mind leads …

Phil Wallach header image 2

OpenLaszlo: saving LzLoader

August 22nd, 2007 · No Comments

One thing that tripped me up early on is a know bug in the OpenLaszlo loader.  Basically, if a view is destroyed before the resource completes loading, then the loader chokes and nothing more is heard from it. 

Unsurprisingly, this is very very bad.

The bug is documented here:
    bug: destroy before resource is loaded leads to full load queue and hang

The fix is noted in the bug report.  Basically the following code is added to the application.

    <script>
        LzMakeLoad.unload = function ()
        {
            this.loader.unload( this.loader.mc );
        }
        LzMakeLoad.destroy = function (recur)
        {
            this.loader.unload( this.loader.mc );
            super.destroy( recur );
        }
    </script>

Tags: OpenLaszlo

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

Leave a Comment