[This is a thread from just over a month ago]

On 10/30/10 11:29 AM, Jacek Kałucki wrote:
> Użytkownik Paul McNett napisał:
>> Ok now I understand what you are saying, and you are right.
>>
>> Case 1:
>> biz.Record.cust_name = "ABC"
>>          |
>> cur.setFieldVal("cust_name", "ABC")
>>
>>
>> Case 2:
>> biz.setFieldVal("cust_name", "ABC")
>>          |
>> cur.setFieldVal("cust_name", "ABC")
>>
>>
>> I'd need to give it a little more thought, and see some opposing viewpoints, 
>> but
>> right now it seems to me we should consider reworking it so that we have:
>>
>> biz.Record.cust_name = "ABC"
>>         |
>> biz.setFieldVal("cust_name", "ABC")
>>         |
>> cur.setFieldVal("cust_name", "ABC")
>>
>>
>> ...especially since there's no good way to subclass dCursor.
>>
>>
>
> I don't think we must do that, but Record property in business layer
> should reference to that layer.
> Remember you can still use bare Dabo data cursors, without business layer,
> for fast data access.
> Currently, accessing dBizobj.Record.field is equivalent to
> dBizobj._CurrentCursor.Record.field.
> There could be Record property, that refers to business layer and second,
> e.g. RawRecord that refers to data layer directly.

I have a patch that keeps cur.Record but adds biz.Record as well. So when you 
issue:

biz.Record.field = "new val"

it calls biz.setFieldVal(...) instead of going directly to the cursor.

This allows for easy interception of field value changes at the biz layer. I 
also 
want to add beforeSetFieldVal() and afterSetFieldVal() hooks.

I'll commit this soon for review.

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