Try dataset.setData([ ]) might do what you want. That is, passing in an empty array.
On Thu, May 22, 2008 at 1:35 PM, Jesse Norell <[EMAIL PROTECTED]> wrote: > Hello, > > What is the proper way to empty a dataset? If I use setChildNodes([]) > it seems to do what I want, except inspecting the dataset shows "data" > still holds the old values. Maybe that's not a problem? I could follow > up the setChildNodes() with a datasetname.data=[], but I don't know if > that's a bad thing to do or not (has side effects? memory leaks?). > (And a maybe related question: do you need to worry about memory leaks > in openlaszlo apps?) > > I've also tried to use destroy() and assign a new LzDataset(), but the > databound components don't work after that. > > I imagine you could loop through the entire dataset calling > removeChild() on each child node, but I suspect that would be > inefficient for large datasets. > > Thanks, > Jesse > > > -- > Jesse Norell > Kentec Communications, Inc. > [EMAIL PROTECTED] > -- Henry Minsky Software Architect [EMAIL PROTECTED]
