Am Mittwoch, 24. September 2008 21:37:16 schrieb Ed Leafe:
> On Sep 24, 2008, at 12:22 PM, Paul McNett wrote:
> > And I'll reiterate again that I do this all the time, by using
> > biz.DefaultValues["pk"] = myFunc. It works without any special
> > workaround.
>
>       But if you were to change the PK between that initial assignment and
> saving, it would not work. That's the difference between your system
> and Sibylle's: since your PK is assigned early, it appears in the
> cursor's _newRecords dict. Sybylle defaults to no value, so None gets
> stored in _newRecords. Later when the record is being saved, the
> manually-changed PK is checked against _newRecords, and it is not
> found. So Dabo treats it as an update instead of an insert, and we get
> the bug that was observed.
>

I'm trying to find a way to assign my PK early on. My first attempt wasn't 
successful, but I think I know why: I called biz.setFieldVal() in the 
beforeNew() method, but at this point my entry field wasn't yet filled in.

It sounds a little crazy, but I suppose I might set biz.DefaultValues["pk"] 
from the UI (the UI must know about the bizobj anyway, only not the other way 
around). Will try it out and report here.

Greetings,
Sibylle

-- 
Dr. Sibylle Koczian


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[EMAIL PROTECTED]

Reply via email to