Closed JoshuaKast closed 5 years ago
When looking at the code OctaveContext.OctaveSettings
is a static variable, which means it can be set before creating an OctaveContext
instance, but I might be mistaken.
@cesium32, @CptWesley is right. OctaveContext.OctaveSettings are supposed to be set before first OctaveContext is created. It was designed this way to reduce verbosity when using OctaveContexts. These settings are shared because there is a single pooling mechanism which requires that all cached contexts were constructed using the same settings.
Let me know if it works though because there were previous reports that the library has some issues when octave path is specified through OctaveSettings. If there are any problems, please open a new issue and I will investigate.
I was pleased to find this program, as it is exactly what I was searching for to solve a problem.
One issue I notice: the code works perfectly when I include Octave in my path. However, I do not think it is actually possible to specify the Octave executable through the code. This is because the OctaveContext creates the processPool item in its constructor, before anyone can have a chance to modify the OctaveSettings object. Perhaps it is possible to overload the constructor, and have an option to pass a customized OctaveSettings?