Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bug ? Successfully having C0000005 error
Message
From
24/12/2006 08:33:38
Suhas Hegde
Dental Surgeon
Sirsi, India
 
 
To
24/12/2006 08:25:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01180000
Message ID:
01180012
Views:
19
>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 []
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform