Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I add some code to multiple methods
Message
De
14/10/2003 10:36:21
 
 
À
14/10/2003 10:26:14
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00838523
Message ID:
00838532
Vues:
19
You need to set the flag at the beginning of the method code because there may be a pre-mature code exit ( as supported by Jim Nelson ) like this
if some condition
  return
endif
code
code
code 
if some other condition
  return
endif
code 
code 
return
>>I have a VFP 8 multiple page pageframe that contains about 100 text boxes. I want to stick in a line of code, "m_fieldmodified=.T.", in the interactivechange event of each text box. Many of the text boxes already have text in the interactive change event. Is there a quick way of doing this?
>>
>>Thanks,
>>
>>Vim
>
>This method works best for each individual page.
>
>Edit the page in the pageframe.
>Select all the checkboxes you want to change.
>Run the following code.
>
ASelObj(laCheck)
>For Each loCheck in laCheck
>  lcCode=loCheck.ReadMethod("InteractiveChange")
>  lcCode=lcCode+Chr(13)+"m_fieldmodified=.T."
>  loCheck.WriteMethod("InteractiveChange", lcCode)
>Next
>You may need to modify this code to put the line at the appropriate place, but it should get you started.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform