Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding controls / objects with For Loop or IF statement
Message
 
 
À
10/10/2003 13:21:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00837173
Message ID:
00837530
Vues:
26
A code can be only in the methods of the class. In this case it can be Init. See correction in the code below.

>When I put the FOR loop into the form class and I try to compile the .prg I get an error message on the FOR command line that says "Statement is not valid in a class definition."
>
>
>DEFINE CLASS getparam AS FORM
>	CAPTION  = "Get Parameters Form"
>	BACKCOLOR = RGB(0,0,255)
>	FORECOLOR = RGB(255,255,255)
>	cKeyboard = ''

PROCEDURE Init
>	* loop through goapp.aGetParam and bulid buttons
>	FOR liLoop = 1 TO ALEN(goapp.aGetParam,1)
>		DO CASE
>			CASE goapp.aGetParam[liLoop,1] = 'D'
>				* date type
>				* The label for the parameter
>				ADD OBJECT lblOne AS LABEL
>        ENDCASE
>    ENDFOR
ENDPROC
>
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform