Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AddObject in a loop not working
Message
 
 
À
13/07/1999 18:32:11
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00241060
Message ID:
00241127
Vues:
14
Jill,
local lcLabel, loLabel, lnY
lnY = 0
SCAN
    lcLabel = 'lbl'+process_assoc.process_abbrev
    if ( type( "thisform." + lcLabel ) != "O" )
       THISFORM.AddObject(lcLabel,'gen_label')
       loLabel = eval( "thisform." + lcLabel )
       with loLabel
         .Top = lnY
         .Visible = .t.
          lnY = lnY + .Height + 2
       endwith
    else
       MessageBox( "You already have an object named:" + lcLabel )
    endif
ENDSCAN
>I am trying to add combo boxes on the fly in my form, from data in a table. Here is my code. It works the first time through, but the second time gives a syntax error on AddObject.
>
>SELECT process_assoc
>SCAN
> lcLabel = 'lbl'+process_assoc.process_abbrev
> LOCAL &lcLabel
> THISFORM.AddObject(lcLabel,'gen_label')
>ENDSCAN
>
>What is going on?
>Jill
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform