QUOTE:
To get rid of the exception, you should preface all of your PricePane, Bars et cetera with "WSFunction." as well. For example:
CODE:
Please log in to see this code.
That was the fix. Thanks a bunch! I'm going to have to port the main strategy to the Visual Studio IDE so I can use the debugger to properly locate all these bad NULL references.
There's one more remaining problem. Apparently, the Gics functions (see code below) need to be called by reference as well. So if the Gics functions aren't type "WealthScript", then what type are they, and how do I capture that type in the main program? (I'm assuming I pass their type the same way I pass the WealthScript reference.)
UPDATE: The Gics functions are of type "string" (says the Programming Guide)? So why would a reference to them need to be passed from the main program in the first place? Why am I getting NULL references to these functions if the code compiles correctly? I'm "assuming" Visual Studio would gripe if it couldn't find WealthLab.DataProviders.Gics, but I could be wrong. I'll have to look into that further.
CODE:
Please log in to see this code.
QUOTE:
It's pretty strange that this script compiles for you without a parameterless constructor being defined.
These are
not static methods. They
require a reference to be passed. But if they were defined as static as with an Extension Method, then you may be right about needing the parameterless constructor.
I've never defined an Extension Method before, but their syntax does provide for cleaner code, and I like that. I may try to define these methods that way later (after I get things running).