Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OK to search .vcx file programatically?
Message
 
 
To
15/09/1998 14:25:29
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00136686
Message ID:
00136958
Views:
26
Sylvia,

Another nuance here that might break the code in the future. Given this class tree
ListBox
   cListBox
      TheListBoxOnTheForm

TheListBoxOnTheForm.Click()
cError = onerror()
on error blahblah
newform = createobject()
on error &cError
You have a class cListbox from which all list boxes are derived. Now it appears you have not overridden it's Error() method... time passes... you add generic error handling to all of your first level subclasses. Now your form will break because the overridden Error() method in cListbox takes precedence over the global error handler.

Needless to say I'm a firm believer in letting the objects handle their own errors or delegating them to another object and not using a global error handler to deal with this type of problem.

>>It will not overwrite. 'cError' preserves it.
>
>Great! Thanks a lot for that tip. I learned something new...that hasn't happened in the past 5 minutes:)
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform