Group: StrataFrame Users
Posts: 70,
Visits: 3.5K
|
Hi Trent,
I appreciate your interest and because you asked, here it goes. The need to keep the BOs synchronized starts with the nature of the two tables. In FoxPro these tables were separated to keep one of them from unauthorized Windows access to confidential information while the other table contained public information, but the data in these two tables logically belongs in a single table with the security issue being handled by RBS. Because of this one to one relationship, when a record is added in one table a related record must be added in the other table etc. So all of the adding, editing, deleting, saving, and undoing needed to be synchronized. The IncludeInForm...Type properties allow that sychronization easily.
The gotchas in the framework that I kept running into mostly related to the visibility of buttons on the MFTS. The framework handles the visibility of these buttons in a Private (non-overridable) method named HandleEditingStateChanged in the MFTS which gets executed many many times and apparently sometimes without raising the EditingStateChanged event. When determining the visibility of the New, Edit, and Delete buttons that method checks all the BOs that are involved in the form's Add, Edit, or Delete to see if any one of those BOs is in the idle state. If so, the related button on the MFTS is made visible. A specific instance of the problem is when a user begins editing one of the BO's. Because that BO goes into the editing state but the other remains in the idle state, the New button gets incorrectly enabled by the framework. Similar problems occur when only one BO is dirty and a Save fails because of a rule violation. Many permutations of this problem were getting difficult to solve and I finally decided that the framework was not designed to handle this special case one to one type relationship. It might have been possible if a property existed somewhere indicating this special case was needed but then the HandleEditingStateChanged method would need to be modified which I could not do myself.
So in the end, I think combining these two tables into one and handling the security with the RBS is much easier and safer.
Sam Tenney
|