Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bug ? Successfully having C0000005 error
Message
De
24/12/2006 08:33:38
Suhas Hegde
Dental Surgeon
Sirsi, Inde
 
 
À
24/12/2006 08:25:34
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01180000
Message ID:
01180012
Vues:
20
>Yes, I get the bug using your original code.
>
>Does the following work for you?
>
for m.xi = 1 to 10
>	release ALL EXCEPT x*
>	DIMENSION xxx[10]
>
>	m.f1 = CREATEOBJECT("custom")
>	m.f1.addproperty('ayyy[1]')
>	ACOPY(xxx,m.f1.ayyy)
>
>	m.f1.ayyy[1] = CREATEOBJECT('custom')
>	m.f1.ayyy[1].addproperty('azzz[1]')
>
>	ACOPY(xxx, m.f1.ayyy[1].azzz)
>	?m.f1.ayyy[1].name 
>endfor
this works good and .name was just for a reference that is not acctually needed
it would fail only if there is no array element specified

Like

?m.f1.ayyy.azzz && crashes
?m.f1.ayyy[1].azzz && works
?m.f1.ayyy.azzz[1] && crashes

even
	release ALL
for m.xi = 1 to 10

	DIMENSION xxx[10]

	m.f1 = CREATEOBJECT("custom")
	m.f1.addproperty('ayyy[1]')
	ACOPY(xxx,m.f1.ayyy)

	m.f1.ayyy[1] = CREATEOBJECT('custom')
	m.f1.ayyy[1].addproperty('azzz[1]')

	ACOPY(xxx, m.f1.ayyy[1].azzz)
	?m.f1.ayyy.azzz[1] && this crashes
endfor
But shouldnt the first element be returned without []
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform