From: Johan V. <jvr...@sq...> - 2006-06-28 19:24:03
|
Hi, Given a form with data (in text widgets, checkboxes, and so on). This data comes from a database. On the form, the user can make changes. On the bottom there are the familiar buttons Cancel, OK and Reset. I need to keep track of changes. In particular, I need to know if anything changed from the start. If so, I can enable the OK and Reset buttons. If nothing has changed, these are disabled (again). My usual approach is to make a copy of all data when the form is first filled, and use the idle loop to compare all fields to see if something has changed. This works, but I assume there are better ways. What would be a good pattern for this? Listen to focus in / focus out events? How do you do this? -- Johan |