[Laszlo-dev] destroy http resource loading view hangs application

Denis Bohm denis at fireflydesign.com
Mon Jan 30 09:00:35 PST 2006


I added the code below in the onclick method and it appears that when a 
view is destroyed, it's loader is not taken out of the load queue - so 
the load never finishes.  The load queue is then stuck and no more loads 
occur.  I tried calling view.unload, but it doesn't appear to work.  
Anyone know how to remove something out of the load queue properly?

            for (var i = 0; i < LzLoadQueue.listofqs.length; ++i) {
                Debug.write(LzLoadQueue.listofqs[i].length);
            }

P T Withington wrote:
> I can believe there is a bug there.  Try setting 
> LzLoader.__LZMonitorState to true.  This will trace the load queue in 
> the debugger.  Perhaps that will reveal something.
>
> On 30 Jan 2006, at 01:41, Denis Bohm wrote:
>
>> The program below removes the images from a container and then loads 
>> ten images when you click the button.  If you wait for all the images 
>> to load then it works fine.  If you click before all the images are 
>> loaded it hangs.  Am I doing something wrong or is this a bug?
>>
>> <canvas>
>>
>>    <simplelayout axis="y"/>
>>    <button text="click me">
>>        <method event="onclick"><![CDATA[
>>            // remove old subviews
>>            var subviews = content.subviews;
>>            for (var i = subviews.length - 1; i >= 0; --i) {
>>                var view = subviews[i];
>>                view.destroy();
>>            }
>>                       // add some new ones
>>            for (var i = 0; i < 10; ++i) {
>>                new LzView(parent.content, {resource: 
>> "http:icons/star.png"});
>>            }
>>        ]]></method>
>>    </button>
>>    <view name="content">
>>        <simplelayout axis="x"/>
>>    </view>
>>    </canvas>
>> _______________________________________________
>> Laszlo-dev mailing list
>> Laszlo-dev at openlaszlo.org
>> http://www.openlaszlo.org/mailman/listinfo/laszlo-dev
>
>



More information about the Laszlo-dev mailing list