Information générale
Catégorie:
The Mere Mortals Framework
Paul,
From the manual,
Replacing the “Built-In” Business Object
When CListObjEdit was initially designed, it contained a “built-in” business object (CListObj1) for the sake of convenience. However, if you would like to use your own custom business object with CListObjEdit, and disable the built-in object, do the following:
1. Set CListObjEdit’s CListObj1.lEnabled property to .F.
2. Drop your custom business object directly on the page, or if there is no PageFrame, drop it directly on the form.
3. Select the new business object and from the Format menu, select Send to Back
4. If you dropped the new business object directly on the form…you should select the form’s oSessionEnvironment object and Send To Back
Sending an object to Back changes its order of instantiation, or ZOrder. For more information, see the section A Word About ZOrder.
5. Enter the following code into the new business object’s OnBizObjEmpty and PostRequeryHook methods:
This..SetButtonEnabledStatus()
6. In CListObjEdit’s PostInitHook method enter the following code, replacing the text in angled brackets with the fully qualified path to your custom business object:
This.ChangeBizObj()
HTH
Rex
>I'm trying to use the cListObjEdit form control on a new form. I'd like to override the built-in bizobj and replace it with my own. I figured it was similar to using the cBizObjMaintForm, so I made the changes suggested there on my new form (disable bizobj, add new bizobj, add code in various places, etc). The problem I'm running into is that the cmdAdd.Click() method seems to be referencing the parent bizobj as:
>
>THIS.Parent.oBizObj.New()
>
> Which of course fails, since that's a reference to the old bizobj, not the new one (THISFORM.oBizObj). Do I just have to override the click method with my own code or is there a way of making this work correctly?
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement