On 11/15/10 2:14 PM, Ed Leafe wrote:
> On Nov 15, 2010, at 12:30 PM, Paul McNett wrote:
>
>> 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?
>
>       It's a bit more complicated than that. Consider this situation: a user 
> changes something in a record, and then applies a filter, with the result 
> that the changed record is removed from the current data set. The user then 
> clicks 'Save'. What should happen? Should only changes in the current data 
> set be saved? Or all changes? Do we 'crawl' up the filter stack to find 
> changed records?
>
>       What if they close the form with the modified records filtered out? 
> Should that give them a warning, even though the data they are looking at is 
> clean?

I think it shouldn't be complicated. Can we keep as a separate concept the 
original 
dataset, and start the LIFO stack with the first filtered set? And the filtered 
sets 
only contain pointers to the actual dataset, instead of being full copies. So, 
setFieldVal() operates on the dataset, but iterating records goes through the 
filter.

I think RowNumber would match the actual dataset, so when you filter(), the 
RowNumbers of the filtered set may be [0, 5, 6].

RowCount would report the filtered count. save(), new(), and delete() would 
operate 
on the real dataset, but would have to also resync the filter(s).

This would, at least, seem to get closer to what I originally thought filter() 
did.

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]

Reply via email to