Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Puzzling error
Message
 
 
À
15/04/2003 11:50:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00777568
Message ID:
00777881
Vues:
17
Hi Bill,

They didn't fix that bug for array properties. Here's a repro.
oTest = NEWOBJECT("test")
DIMENSION oTest.laList[10]
FOR i=1 TO ALEN(oTest.laList)
	oTest.laList[i] =	REPLICATE(TRANSFORM(i), 250+i)
ENDFOR

FOR EACH lcStr IN oTest.laList
	? LEFT(lcStr,20), LEN(lcStr)
ENDFOR
RETURN

DEFINE CLASS test AS custom
	Name = "test"
	DIMENSION laList[10] 
ENDDEFINE
You can either change your code to use FOR ... ENDFOR loop or use array variable instead of property array in FOR EACH loop.

>Hi Sergey,
>This is the code that busted.
>I think this is all the pertinent code.
>If you want I can show you everything.
>I was wrong in my first message. The next line is 273 characters long.
>Note this test.
>
>I tried the example from mskb #Q305238
>this does not crash when I execute it from the command window.
>
>DIMENSION  laX(1)
>laX(1) = SPACE( 273 )
>FOR EACH lcX IN laX
>  ? lcX
>NEXT
>
<snip>>
>
>>Hi Bill,
>>
>>It suppouse to be fixed in VFP7. See FIX: FOR...EACH Fails When Character Array Element Contains More Than 255 Characters mskb #Q305238. Can you post HTML that causes this problem, if it's not to big?
>>
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform