On 11/14/10 1:49 PM, Ed Leafe wrote: > On Nov 14, 2010, at 3:38 PM, John Fabiani wrote: > >> Maybe making it clear that filtered dataset are read only and static. > > Except that that's not true at all. You can add, modify, save, delete, > etc., from a filtered dataset just like any other. The only this to keep in > mind is that when you filter you create a new dataset that is not connected > to the original dataset, and changes to the filtered set are not mirrored > back to the original.
I think we need to make a choice about this and stick with it. Either: 1) I can add/delete/modify a filtered dataset and the changes make it back to the original.[1] --or-- 2) Filtered datasets throw exceptions upon setFieldVal(), new(), and delete(). Because otherwise, if changes are made while a filter is active, and then we call removeFilter[s](), the changes made during the filter are lost, right? [1]: I had naively thought that was the case in the optimizations of my app last week. I did lots of: biz.filter(...) if not biz.locate(...): biz.new() biz.setFieldVal(...) biz.removeFilter() So far I haven't actually noticed lost data, but I haven't tested very much, but after realizing that the datasets are put on a stack and popped back off, I can see that I'd have lost data even in the case of not calling biz.new() in the filter. Paul _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev Searchable Archives: http://leafe.com/archives/search/dabo-dev This message: http://leafe.com/archives/byMID/[email protected]
