Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BUG: skip the Assign destroy object or fire a C5 crash
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00893546
Message ID:
00893835
Views:
27
>3 possibility:
>- you have not understood null
>- you are taking to Me in turn
>- you want makes me to lose time

Fabio,

First, you're right, there is a bug here. My apologies, if you've taken what I've said as anything other than a difference of opinion.

Second, what's happening is a call stack problem and will happen anytime a property with an _assign event is assigned an object reference three times. IOW, it doesn't have to be a reference to an existing object. The same thing will happen if you use CREATEOBJECT() or NEWOBJECT() to create, for example, a label.

Here's the trace of what happens:
* Click 1
Thisform.MyObject = This
MyObject_Assign Parameter = object, MyObject = NULL
* Click 2
Thisform.MyObject = This
MyObject_Assign Parameter = object, MyObject = object
* Click 3
Thisform.MyObject = This
MyObject_Assign Parameter = object, MyObject = object
MyObject_Assign Parameter = NULL, MyObject = object
Now without the code I provided earlier, you get a C5. With it I've been unable to reproduce a C5. What occurs because of this is that the object is corrupted in both cases.

Is it serious? I don't know. How often would one repeatedly assign a object to a property? I've never done it.

It may, however, be indicative of other problems and therefore, I would suggest that you submit a bug report to Microsoft.

Finally, I do understand null and its implementation in VFP. Furthermore, I do understand and agree with the logic that implemented. In short, null is unknown and therefore cannot be evaluated. If it can't be evaluated it cannot be equal to anything else, including itself. By returning NULL in a statement like ? X = NULL, VFP indicates this.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform