Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Refreshing shapes
Message
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:
01043514
Vues:
8
Hugo,

Good point about scan. I haven't paid attention to this detail.

I also think it could be a good idea to create some predefined names instead of random names. That's why I'm saving last added shape number and create a new one using shpN name. This way you can access it later in the code if needed.

>Grady,
>
>I do not know, but I distrust, without reason, just gut feeling, the use of thisform.Controls in that way, although I am sure it works, I would never use it that way, for it seems to me the link between the new object created and the objects count of the parent is a "weak" link, there is, in my view, no guarantee that this will always be true, I do not know, imagine that the VFPT decide in the future to have the array ordered by name for whatever reason, then your code is no longer valid.
>
>I would use something along this lines:
>
>
>			lcObjName	= sys(2015)
>			Thisform.NewObject( lcObjName, "shape")
>			With Evaluate('Thisform.' + lcObjName)
>
>
>Also, why you use the Count and the For, wouldn't be easy to just scan?
>
>
>lcOrder = set("order")
>set order to
>scan
>....
>endscan
>set order to &lcOrder
>
>
>
>Sorry, I know I am not helping much with your real problem, just wanted to comment about those two things
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform