When the Compile button is clicked, the following code gives an unhandled IO exception and then opens a dialog for sending debugging information to Microsoft.
CODE:
Please log in to see this code.
When the dialog box is closed, Wealth-Lab is terminated.
Which parts of the code are executed at the end of a compilation?
As a workaround, I moved the file opening and closing statements to Execute().
Size:
Color:
I'd think the constructor is called after compiling finishes, this is how the strategy parameters are discovered and displayed. Does the path c:\tmp exist on your PC? Assuming it does it may be possible the constructor is being called twice and the result is that you can't access the file because it's already open by another process (in this case the other call).
If you want to figure out when/if they are called you should use logging to the event viewer (or some other method) inside a try/catch block to see what is going on.
Dave
Size:
Color:
Don't use a destructor of the class.
I remember reporting 2 1/2 years ago that adding a destructor to a class that implements WealthScript will crash WL5. Crash will happen when compiling if constructor exists, or in runtime if a constructor doesn't exist.
Size:
Color: