There is a known bug (http://www.openlaszlo.org/jira/browse/LPP-1952)
that destroying a view which has a load pending causes a loader to be
leaked and hence all communication with the server to stop. I'm still
waiting (after about 6 months or so) for my boss to approve a
contributor agreement so I can submit the fix for this bug. In the
meantime, I've added some hopefully not too cryptic notes that should
get you pointed in the direction of the fix.
I hope this helps.
Dustin Tinney wrote:
> What is the best way to clear all the nodes out of a dataset?
>
> I have a view that uses a dataset to dynamicly load images. The users
> sees a Category buttons on the screen. Clicking on a button should
> clear all the nodes from the dataset and re-populate it with the new
> nodes for the images in the category that the user clicked on. If the
> category buttons are clicked to fast they just stop working and I
> can't figure out why. It appears as though it's something to do with
> how the clearing of the dataset is taking place.
>
> Code:
> <library>
> <class name="myView" extends="view" visible="false">
> <event name="category1ButtonClicked" />
> <event name="category2ButtonClicked" />
>
> <dataset name="categoryImageData"></dataset>
>
> <button name="category1Button" text="Category 1">
> <handler name="onclick">
> parent.parent.category1ButtonClicked.sendEvent();
> </handler>
> </button>
>
> <button name="category1Button" text="Category 2">
> <handler name="onclick">
> parent.parent.category2ButtonClicked.sendEvent();
> </handler>
> </button>
>
> <view name="categoryImagePanel"
> datapath="local:classroot.categoryImageData:/*">
> <image datapath="@src" />
> </view>
> </view>
>
> <method name="clearImagePanel"><![CDATA[
> categoryImageData.childNodes = [];
> ]]>
> </method>
>
> <method name="addImage" args="imageSrc"><![CDATA[
> var imagePointer = categoryImageData.getPointer();
> imagePointer.addNode("image", null, { src:imageSrc });
> ]]>
> </method>
> _______________________________________________
> Laszlo-user mailing list
> [email protected]
> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>
--
Jason Stafford
Principal Developer
Inspiration Software, Inc.
The leader in visual thinking & learning
InspireData(tm), the newest innovative thinking and learning tool from
Inspiration Software(r), extends the proven power of visual learning to
data analysis. Learn more at www.inspiration.com.
503-297-3004 Extension 119
503-297-4676 (Fax)
9400 SW Beaverton-Hillsdale Highway
Suite 300
Beaverton, OR 97005-3300
_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user