Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing shapes
Message
 
 
À
24/08/2005 11:25:23
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01043393
Message ID:
01043634
Vues:
9
Grady,
>	Thisform.AddObject( Sys(2015), "shape")
>	With Thisform.Controls[thisform.ControlCount] && the last member
>
This is a potentially error prone code fragment. It's not 100% assured that another control isn't going to get inserted by some other chunk of code.
   lcName = sys(2015)
   thisform.AddObject( lcName, "shape" )
   with eval( "thisform." + lcName )
will make sure you have the correct object for manipulation. If you want to relocate an object later on to update it, built its name off of something like it's PK:
   lcName = "crimescene" + padl( crime.crimeno, 8, '0' )
which will let you easily talk to that object later by name.
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