Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to get rid of a container in a container?
Message
From
16/01/1999 14:33:10
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
How to get rid of a container in a container?
Miscellaneous
Thread ID:
00176899
Message ID:
00176899
Views:
75
I have a rather weird form - it has a container, which has another container as a member. The inner container has an array property, which gets populated with a series of containers. These innermost containers are instantiated from a class, and they contain actual controls. So far everything works fine.

A moment comes to repopulate the inner container with a new set of innermost containers. I've tried many things, including

- setting the array property to null, like this: cntOut.cntMid.rows=.null.
- setting them to .null. individually
- releasing each one of them: Release cntOut.cntMid.rows[i]
- removeobject: cntOut.CntMid.RemoveObject("cntOut.cntMid.rows[i]")

In the last case, the .RemoveObject seems to work, but in the debugger I still see all of the inner containers, and when I repopulate the .rows[] array, I see new objects added. The old ones are covered by the new ones (I do it programmatically, because the populating routine fills the middle container top down), but the old ones still receive focus.

I think there are no dangling references in the innermost containers; all the references are from the form downwards (outer container is a member of the form, inner container is a member of the outer, innermost containers are AddObject()ed to the inner one, controls are members of the innermost containers). It's just that the innermost containers won't go away.

Anyone with something better than rat poison? Should I just try to reuse them (they're all of the same class)?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Next
Reply
Map
View

Click here to load this message in the networking platform