Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alias Not Found
Message
 
À
11/01/2000 09:38:23
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Titre:
Divers
Thread ID:
00315735
Message ID:
00316299
Vues:
17
If messages are placed in the business objects then the ojbects become tied to specific types of interfaces. (VFP messages are not compatible with VB.)

What we do is have the UI display messages that indicate something is happening before a business object's method is actually called. Then if the called method indicates that something went wrong the UI is designed to ask the business object exactly what happened and the UI is free to diplay this information. Kevin has recently added and error array to the kBizObj so error codes or messages can be stored there for later query by any UI.

To make a long story short. The idea is that the interface handles EVERY aspect of communicating with the end user. The business object simply records its errors in the aErrorMsg array using the AddError() method. If you do anything else the business objects start to loose the ability to be reused by different front ends that are developed in different languages.

lRetVal = BizObj.Method()
If lRetVal = .F.
For lnCount to Alen(BizObj.aErrorMsg,1)
MsgSvc(BizObj.aErrorMsg[lnCount])
EndFor

I hope this helps.
William Hartgrove
Senior Elephant Waxer
Hartgrove Amusent Park and Youth Hostel
Austin, Texas
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform