Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
User Communications in 3-tier design
Message
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00188770
Message ID:
00188973
Views:
21
Hi Mike-

This makes sense to me. I have been using Codebook for the last year or so and the problem is that the busobj displays messages when errors occur. I like the idea of having the busobj store error info and then allowing the client to retrieve the error message. This is exactly the type of approach I was looking for.

Rob

>Hi Rob,
>
>I've taken a slightly different approach to this that also works quite well. Basically, the business object has a protected cErrorMessage property and SetErrorMessage and GetErrorMessage methods. When a method fails, like save, the calling object calls the business object's GetErrorMessage method, which just returns the error message as a string. GetErrorMessage basically stores cErrorMessage to a variable, clears the property and returns the variable. SetErrorMessage accepts a string, which is added to the existing error message, which is nice in case multiple business rules were violated. It's actually a little more complicated than this because GetErrorMessage actually polls member objects for errors as well, but you get the idea.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform