Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing shapes
Message
 
To
24/08/2005 13:09:59
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01043393
Message ID:
01043478
Views:
12
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
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform