Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange 1575 - object name is invalid error
Message
 
 
To
24/06/2008 16:28:05
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
01326492
Message ID:
01326498
Views:
9
This is very strange code.

Why you're inserting "(" in the name of the object? Also I believe AddObject method has only few parameters (1?). May be you're confusing with NewObject method?

>Hello
>I have a strange error that appears only when running the exe. Does not fail from VFP IDE
>
>In the INIT of a form I populate a couple of arrays of objects
>
>....
>with thisform
>	for i = 1 to 7
>		c = "(" + allt(str(i)) + ")"
>		.addobject("Cal" + c, "DiaCalendario2", i, "thisform.lblDesc", m, pkNov)
>		.addobject("Enc" + c, "EncabDia")             && ERROR HERE WHEN i=7 ONLY
>		.Cal(i).move((i-1) * 50 + px, py + 22)
>		.Cal(i).visible = .t.
>		.Enc(i).move((i-1) * 50 + px, py)
>		.Enc(i).visible = .t.
>	endfor
>
>
>Running the exe, SOMETIMES the line
>
>.addobject("Enc" + c, "EncabDia")
>
>
>fails ONLY when c is 7
>EncabDia, DiaCalendario2 are contained in a VCX, set classlib is OK.
>Any ideas?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform