Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to stop New() execution
Message
From
30/10/2006 12:58:17
 
 
To
30/10/2006 07:52:59
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01165405
Message ID:
01165559
Views:
14
>Michel what I do is raise an exception that I catch on the caller class.

How would you raise an exception in the New() event of the class?

For now, I have adding a property lStop to the class. Then, from the object New() event, if I set this to True, when the call will be done to the method, it will know that it has to return. This class only contains one method to initiate the required procedure, thus I verify that property at first. But, it will still be useful to have a better way to do this because in some classes, I might have several methods available for specific procedures and I would need to detect that prior to calling those methods.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform