Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Member object removed - cannot complete the Save operati
Message
 
 
To
03/03/2004 08:14:37
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00882659
Message ID:
00884103
Views:
17
Donald,

Terry is correct, at designtime you can not remove contained objects that have been added to a class at a higher level in the inheritance hierarchy.

You can use RemoveObject() at runtime, or add RETURN .F. to the Init() of the item itself in your subclass. But you'll have to know if other controls within the class depend on the object you are wanting to remove, because you'd break their code if they do.

Whenever you find yourself wanting to remove objects from a class you might want to revisit the ParentClass design and see if it needs to be changed. Perhaps you need to split the inheritance tree into two branches one with and one without the object you want to remove. Another approach would be to use a flag to conditionally instantiate the object in the ParentClass. You can use a custom property to control the instantiation.

>Member object removed - cannot complete the Save operation
>
>This message came up when I attempted to save a .VCX sub-class.
>
>Why is this, and is there anything I can do to fix problem?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform