Author: Matthew L. Brazier
Posted: 1998-07-14 at 12:13:41
<I><FONT COLOR="#663300">>I don't know about the keeping of multiple forms in synch as I don't do this. I always create forms with all the necessary parent and child bizobj's needed in the same form. Now, I do have forms that have multiple bizobj's where one bizobj may be allowed to save/delete/new, and another may only allow new, and then another that may only allow navigation. I accomplish this through properties in my bizobj which update the form's lAllowNew, lAllowDelete, and lAllowSave properties. Let me know if I need to post that information.
I'm interested in this one, so could you post the information?
Many thanks in advance.
</FONT></I>
Marc,
In my sub-classed eBizObj I have:
1) added the properties bizobj_lAllowNew, bizobj_lAllowDelete, and bizobj_lAllowSave.
2) added the following code to the GotFocus event -
this.MakePrimaryBizObj()
DODEFAULT()
3) added the following code to the MakePrimaryBizObj event -
WITH thisform
.lAllowDelete = this.bizobj_lAllowDelete
.lAllowNew = this.bizobj_lAllowNew
.lAllowSave = this.bizobj_lAllowSave
DODEFAULT()
.RefreshForm()
ENDWITH
The code above seems to work in all situations except when you code bizobj's within bizobj's, which was the way the original CB3 worked.
Hope this helps.
Matthew L. Brazier
Developing in VFP 5/6/7, Visual Studio 6
website: www.braziercomputerconsulting.com
email: mbrazier@braziercomputerconsulting.com