Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CListObjEdit form control
Message
De
15/02/2000 13:08:18
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00332207
Message ID:
00332320
Vues:
13
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
Fil
Voir

Click here to load this message in the networking platform