Użytkownik Paul McNett napisał:
> On 11/29/10 9:56 AM, Jacek Kałucki wrote:
>    
>> Użytkownik Paul McNett napisał:
>>      
>>> I think this makes sense. If the user explicitly hits "requery", they are 
>>> going to
>>> expect all child data to be up to date, too.
>>>
>>> I'm thinking we should maybe put this at the biz.requery() level though, 
>>> which will
>>> require additional code to separate the requeries generated from 
>>> requeryAllChildren()
>>> - here, we don't want to expire the cache - from the requeries generated 
>>> from
>>> elsewhere, including from dForm.
>>>
>>> Hang on, I'm working on something that fixes up another case, too.
>>>
>>>        
>> I'm glad to hear it.
>> Could you also consider moving lastRequeryTime check
>> inside the cacheExpired() method (http://dabo.codepad.org/n9CI9pab)?
>>      
> Not sure what that would do differently (if lastRequeryTime is 0, then it'll 
> return
> True, which is what your code does).
>
>    

The lastRequeryTime equals zero if cursor wasn't requeried yet.
I see, you changed you code to:
     if child._CurrentCursor.lastRequeryTime or child.cacheExpired():

It's mean, that if cursor was already requeried, it will be requeried again,
no matter did cache expired or not, you probably eat beginning 'not'.
Since you reference lastRequeryTime in cacheExpired(),
you can do it fully and check all conditions in one place.

-- 
Regards
Jacek Kałucki


_______________________________________________
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