Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Behavior - New Child on New Parent
Message
 
To
09/07/2003 09:25:05
Robert Jewett
Q Technology Consulting
Tyler, Texas, United States
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00808305
Message ID:
00808464
Views:
16
>>Did you set the "Parent Object" option in the child bizobj via the builder (on the "Parent/Child" settings tab)? You need to tell the framework which bizobj is each child's parent.
>
>Hi Paul-
>
>Yes, the parent object is correctly set. In following the trace, it also appears that the child's bizrules are being checked for (there are not any, but things are getting that far), but no new record is ever added or actually saved.

Just an FYI - the cParentBizObj property on your child object (aka the "Parent Object" via the builder) is set to the "Name" of the parent biz obj, not a reference to it. That is, it is set to: MyParentBizObj, not ThisForm.pgfPageFrame.Page1.MyParentBizObj.

At any rate, in the parent biz obj, add this code to the New() method:
SET STEP ON
RETURN DODEFAULT()
Then, trace through the code. It sounds like, for some reason, your parent biz obj isn't finding the child object in the child collection. You're interested in this chunk of code:
IF lnRetVal = FILE_OK
	IF This.lCascadeMessages AND TYPE("This.RefBizObj") == "O"
		LOCAL lnCount, lnObjCount, loChildBizObj
		lnObjCount = This.RefBizObj.GetObjectCount()
		
		FOR lnCount = 1 TO lnObjCount
Basically, what is supposed to happen, is when each of your bizobj's instanciate, they're supposed to register themselves with the form (the bizobj calls the forms RegisterBizObj() method with a reference to itself). The form's ProcessBizObj() method sets up the parent/child relationships between the bizobj's (make sure the parent is instanciated before the child!) based on the property settings.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Previous
Reply
Map
View

Click here to load this message in the networking platform