Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adding method to subclass of KBizObj issue
Message
 
 
À
29/06/2005 17:22:59
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Versions des environnements
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01027525
Message ID:
01027550
Vues:
18
Igor,

The problem looks indeed weird. My only suggestion would be to try with the different method's name, say, GetFormName. Also, why do you need this method from the business object? The business object should not care about the form it belongs too. The behavior of the Biz Obj should not be different. If you need something different on different forms you may want to code accordingly in form's instances of biz obj.

>Hello MM developers!
>Have rather unusual problem with subclass of KBizObj.
>We are using MM for a few years now and since the very beginning we have subclassed practically all major MM classes(KBizOBJ, CForms etc) to be able to modify those by adding our own methods and properties. For example, KBizObj was subclassed to MKBizOBj. ALL our business objects are subclasses of MKBizObj thus inheriting everything from KBizObj and MKBizObj. Sorry for so many details, just want to describe the situation.
>Everything worked great. Lately, we have added two methods to MKBizObj(these are very first methods added to MKBizObj) and we are calling them from within our application in one of the applications BizObj's DE OpenTables method.
>Now the problem: application crashed with the error " Property GetHostFormName" is not found, where GetHostFormName() is a method on MKBizObj.
>After compiling application library and running the app again, the error DIDN’T appear again but as soon as FoxPro session got closed and re-open again ,the error appears unless app library got compiled again. If FoxPro session keeps open, the error never repeats itself.
>I tried calling the same method from different app’s BizObj - didn't help. I tried recompile all BizObj, including MKBizOBj, I tried to pack KBizObj .vcx. nothing seems to work. Since after compiling the error disappears, it useless to say that app BizObj is subclasses from MKBizOBj and not directly from KBizOBj.
>Then I added the same method(GetHostFormName()) to the based MM KBizObj - no error EVER occurred.
>In conclusion, I know that it doesn't make any sense but it seems that you can't add a method to the class that subclassed from KBizObj???
>Any idea? Anything at all?
>Igor
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform