Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Viewing Specific Method Code For All Objects
Message
De
02/08/2001 13:18:33
 
 
À
02/08/2001 12:35:44
Jay Johengen
Altamahaw-Ossipee, Caroline du Nord, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00538937
Message ID:
00538960
Vues:
12
This message has been marked as the solution to the initial question of the thread.
>Is there a way to view all the Init methods for all objects in a form? Trying to locate the source of a behaviour and believe that the cause is within the Init of some object. I know I can browse all the method code for the records in the scx, but I was hoping for something that just gave me the method I was interested in. Thanks!
>
>Regards, Renoir

Since the methods fields puts the methods in with PROCEDURE..ENDPROC, and always with the same case (mixed for native methods, lower for custom), you could do something like this...
Use myform.vcx
Scan For "PROCEDURE Init" $ methods
  If Found()
    lcProc = Substr(methods, At("PROCEDURE Init", methods))
    lcProc = Left(lcProc, At("ENDPROC", lcProc)+7)
    lcObject = Alltrim(objname)
    If !Empty(parent)
      lcObject = Alltrim(parent)+"."+lcObject
    EndIf
    ** put it where you want it
  EndIf
EndScan
You'll need to adjust it for contained objects that have init's in the form. They'll look like PROCEDURE cntContainer.txtContained.Init...
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform