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:
00822023
Views:
15
Thanks for the reply - the project is a PRG. No design time issues.
*form from create object.

oform.addobject('oBigContainer','subBigContainer')

*The add is inside a loop.

for c = 1 to numberofcontainers
lcLittleContainerName='cnt'+right(str(c+100,3),2)
oform.oBigContainer.addobject(lcLittleContainerName,'subLittleContainer')
loLittleContainer=eval([oBigContainer.]+lcLittleContainerName)
loLittleContainer.top=(c-1)*90
... etc ...
endfor

*remove looks like:
oform.oBigContainer.RemoveObject(lcLittleContainerName)
When I activate the command window and do it from there - works. Only fails inside the PRG. I am checking to see if changing sequence of the remove instruction has an affect. Also - the sliders are OCX - so I will need to see if an AutoYield offers some hope!

Do you think I should add the containers in the form's parent class before it [the form] is subclassed via CREATEOBJECT?

>Just for curiosity did you use ADDOBJECT to add the container to the form or was it added at design time?
>
>>This project has a form, with a container (that contains smaller containers).Sliders move the big container around in the form (have set autoyield).
>>
>>When a process removes a "liitle" container inside the "big" container inside the program:
>>
oForm.oBigContainer.RemoveObject("oLittleContainer")
>>VFP crashes. When I remove the object from the command window while the form is running, it works okay! BTW: oLittleContainer contains some textboxes.
>>
>>It does the same in both 6 and 7. I lieu of a secret workaround I could just INVISIBLE the discarded container (and rename it).
>>
>>Thanks
Imagination is more important than knowledge
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform