Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Form Events Order Problem
Message
De
02/05/2000 13:13:21
 
 
À
02/05/2000 11:25:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00365110
Message ID:
00365176
Vues:
15
>I have a form (FormA) and in the init of FormA it fires off another form (FormB). The init method of FormB calls a method in a class which is placed on FormB. I am getting an error that it cannot find the method in the class which is on the FormB. I believe that this is from the fact that the forms are not completely initialized at that point. Is there a way around this problem? Can I create a method that gets called after the forms completely initialize?
>
>TIA

Quinn,

Let me see if I have this straight ...

You init FormA
FormA.Init inits FormB
FormB contains an object
The init of FormB attempts to access a method of the object

Is this the correct sequence of events ???

This type of problem is the evidence for my argument that all methods should return some value indicating success or failure.

I would suggest stepping through the code from the Load event of FormA and watch when things happen.

You are likely to find one or both of two problems.
One as Cetin mentioned, the method may be private to the object.
Two, the object may be out of scope at the point the method call is made. One way to tell for sure is when the debugger pops up, go to the watch window and type in [FormB.(Object).Name], where (Object) is the object in question. At the point where you type it in, it should say (Unable to Evaluate) ... If it says (Unable to Evaluate) at the point where the method call is made, the object is out of scope.

That said, as a rule I don't load forms from other forms. If I had a case where I always wanted both forms loaded simultaneously, I would do so from procedure code in the menu call.

DO FORM FormA
DO FORM FormB

Just my 2 krupplenicks worth ...

Regards,

Jason
Jason Tryon
Senior Systems Analyst / Technical Lead
eBusiness / iPage
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform