Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assigning common error handler to existing controls
Message
From
07/07/1999 20:52:31
 
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00238565
Message ID:
00238639
Views:
16
>David,
>
>FWIW,

It's worth a lot...thanks

All of my lowest level classes that are derived from the VFP BaseClasses have this error method:
>
>ObjError( this, nError, cMethod, nLineNo )
>

Yeah. This is just about how my ON ERROR procedure interface looks right now. I presume 'this' is the handle you use to determine the context in which the error occured and thereby customize the handling of the error. At runtime, is it possible to use 'this' to derive THISFORM and/or other objects which are further up the execution control hierarchy. For example, right now I pass the variable pcErr to my ON ERROR routine which determines its response based on the value of pcErr. At key points in a procedure, I set the value of pcErr to correspond to 'the current state of processing'. Is that how you use 'this'? ;-)

(OK...I know you're tempted to respond 'That depends on what the meaning of is, is.' ... so please try to avoid temptation!)

Also, more generally, are there other attributes that you've built into your own baseclasses that you find apply to just about any project? Error handling is a natural, and I'm thinking the same thing about environment variable initialization. Anything else?
"The Iron Fish: The water is cold...but the fish don't mind"
...Jay Jenks, boyhood chum
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform