Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Alias Not Found
Message
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Title:
Miscellaneous
Thread ID:
00315735
Message ID:
00316299
Views:
23
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform