Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Are the FFC really designed to be used?
Message
De
09/06/2003 15:28:47
 
 
À
09/06/2003 14:12:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00798026
Message ID:
00798082
Vues:
31
Ok, here's my most recent problem:

Every FFC is sub-classed from the _base.vcx classes.
Every _base class has it's Error() method ignore all errors during runtime.

So my global error handler NEVER gets called from any FFC class. And even worse VFP's default error handler isn't even called. I have to put code into EVERY instance of any object that uses the _base classes to directly call the error handler. I can't just sub-class the FFC classes and put an error handler into the sub-class.Error(), because the FFC seems to make extensive use of NewObject() and AddObject() which would still be using the _base classes.

The only way I can find around it that makes sense is to delete the code from _base.Error(), but's that's against MS's recommendations.


I'm not sure that this would work but, the only other way around it that I can find would be to :
1 sub-class the _base class
2 modify the sub-class to skip over it's parent.Error() to the grandparent.Error()(in case I've redefined the _base classes like MS recommends).
3 redefine every FFC class to use _base_subclass instead of _base.
4 spend hours looking through all the methods in the FFC class looking for places where NewObject() or addobject() is used (because they would be using the _base classes).
5 Rewrite the FFC sub-class methods found in #4 to use my _base_subclass instead of _base, and also skip over their parent.method() to the grandparent.method() (because we don't want to change the FFC either).

But I would never know if I missed any thing, because the _base classes just ignore errors during RunTime.





>Yes, you probably are missing something, but without any specifics it's difficult to give any advice.
>
>
>>I'm having a lot of problems with VFP's Foundation Classes (FFC).
>>
>>It seems like every time I turn around I run into a problem that can't be solved by sub-classing or redefining. I can't seem to find a way around modifying the FFC or _base.vcx.
>>
>>MS recommends redefining _base classes to my own myBase classes and sub-classing the FFC, but I can't make them work as is. Am I missing something somewhere?
>>
>>TIA
Bill Morris
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform