Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Any secrets to REMOVEOBJECT and C5 Errors?
Message
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00821999
Message ID:
00822196
Views:
13
You are correct.

The actual object stream was "oform.cntBig.cntSmall"
The actual removal stream should have been "oform.cntBig.RemoveObject("cntSmall")

The reference stream that was passed from an action on an object parented by
"cntSmall", was "this.parent.parent" which translated to:
"cntBig.RemoveObject("cntSmall"). This is where the C5 happened.

The C5 disappeared when the reference stream was corrected to:
"this.parent.parent.parent" (3 parents) which translated to "oform.cntBig.RemoveObject("cntSmall")

VFP will tell us that a property is not found. C5 seams to tell us (at least in this case) that an object's "ancestory" is incomplete.

>Hi Terry,
>
>>
>When I activate the command window and do it from there - works. Only fails inside the PRG
>>
>
>FWIW, I'd take that as an indication that it's not the destruction of the object, per se, which causes the C5 but probably a later attempt to reference it...
>
>Regards,
>Viv
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform