Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any BizObj reference problem.
Message
De
22/01/2002 08:52:01
 
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00608039
Message ID:
00608349
Vues:
12
Hello Dan,


>>Is MyForm calling the other form?>>
No, it is not.

>>Will the two forms always be open at the same time?>>
Not necessarily.

>>Why doesn't MyForm have an instance of AnotherBizobj on it?>>
Well, methods of AnotherBizObj could be used all over the apps, on the about 5-6 forms. I am not sure if this is a good technique to put this bizobj on all those forms just to use one or two methods. But I can be wrong.

>>What is the relationship between the two bizobjs that makes the bizrules of the one need to look at another bizobj on a different form?>>
There is not relationship between them. AnotherBizObj has a method to apply a mask to the account number(which size could be different all the time) so we want to use it.
This is what we are using in the BizRulesObj's UDF method:

if NOT TYPE('this.oglcontrolobj') == 'O' && 'AnotherBizObj'
this.AddProperty("oglcontrolobj",.null.)
IF this.obizobj.IsFormHost() && this.obizobj is a MyBizObj
this.oglcontrolobj=thisform.refbizobj.GET("glcontrolobj")
ENDIF
IF NOT TYPE('this.oglcontrolobj') == 'O'
this.oglcontrol.obj=CREATEOBJECT("glcontrolobj")
ENDIF
ENDIF
I could solve this problem by using CREATEOBJECT() but we don't want to instantiate the AnotherBizObj if it already exists. Any thoughts? If you have any questions, please ask. Thank you very much for your help and time.
Best Regards.
Igor

Dan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform