Author: Matt Jackson
Posted: 2012-02-16 at 12:55:35
Hello all:
Dabo is a great software package. I'm in the process of moving Microsoft
access applications over to Dabo and using MySql as a backend. It's
working really well.
What are the ways to support the continuing development of Dabo if any?
My main question involves a table where I've added a DateMod and DateIns
columns. They are timestamps to track when a record was last modified and
when it was added. I've found these to be valuable in past systems. I've
put logic in the bizObj that handles this table to update the DateMod field
when a record is saved.
I'm wondering where the best place is to put statements that update other
information in a record based upon actions the user has taken, before the
record is saved.
I first put the code in the bixObj.beforeSave() method.
lstChanged = self.getChangedRows()
for row in lstChanged:
self.setFieldVal("DateMod", datetime.datetime.today(), rownumber)
return None
There were no errors thrown but the data was not saved either.
I then tried putting in validateRecord just
self.setFieldVal("DateMod", datetime.datetime.today())
return None
This works.
I saw on dabo-users that a comment about trying to do changes to the data
before a save. It said that remember to restore row pointer when returning
from beforeSave().
Is the reason that my code in the beforeSave() method didn't work was
because the rowpointer was moved in my code and not restored? I was
concerned that my program did not work as I'd wanted but there was no error
thrown meaning I really didn't understand what was happening in the saving
process.
Again, amazing package and really lives up to your saying "It just works".
Thanks,
Matt J.
--
Matt Jackson
--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---
_______________________________________________
Post Messages to: Dabo-users@leafe.com
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/CAKsSVx=gnqvaw8ZNbgo5uxNtYpZTSs4FnYBdZbT5dvBwLs1RrA@mail.gmail.com