Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can't delete an object
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00028599
Message ID:
00028657
Vues:
48
>>>I subclassed the form class gridaddform from wizstyle and tried to modify it. When I tried to remove an object from the form, it said "Cannot delete objects because some are members of a parent class." I have not subclassed my subclass, so what's going on here? How do I get rid of unwanted objects? I used to copy classes to my own class library and then change their names with the RENAME CLASS command, which is more cumbersome.
>>
>>The object you want to delete is in a container class. If you include a container into your form, you can't delete objects included in the container. You can delete only the whole container.
>>
>>Vlad
>The only container it's in is the form itself. Does that count?

In your case, yes. Because you created a form based on a form class. You can't delete just a part of a class when you're in an instance of that class.

If you want to delete something you must go to the class definition and delete there. Although, I don't think you want to modify the classes provided with VFP. You better make a copy and work with it.

Vlad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform