Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Operating on host project data #30

Open
gmcfarlane opened this issue Apr 19, 2022 · 7 comments
Open

Operating on host project data #30

gmcfarlane opened this issue Apr 19, 2022 · 7 comments

Comments

@gmcfarlane
Copy link

Hello sir

thank you for the cool work. I have been looking for this, originally found the mdsn articles...

I have a project that deals with financial data. I have projects, cashflows, etc.
I want to be able to let the user do some basic scripting and say 'this instance should be the sum of those things...' etc.

i originally pulled the code off msdn. After thinking about a lot of approaches... embedding delegates, i decided the most straight forward way was to make the parser not be a singleton.
Instead, i make a parser instance, and pass data into that, then all the functions have access to the parser.

i considered passing data into the singleton, but figured it was a matter of time before two scripts walked on each other. the data would essentially be a global.

I ran into an issue w/ the msdn code and found this github.

I am going to do some testing and make sure i dont have the same basic problem here.
Assuming that checks out, how would you suggest integrating host project data?
I see there is one other issue that essentially asking for the same thing.

@gmcfarlane
Copy link
Author

Hey there. Upon studying the new codebase, I realize that you have made a lot of progress. Very much appreciated. I have put my data in the parserScript object. This gets passed along w/ each script and is precisely what was needed to solve my issue.
It also addresses the concern i had about 2 scripts fighting w/ each other over the global variables in your previous version!

awesome work sir.

greg

@vassilych
Copy link
Owner

Hi Greg,

The new version now has support for multiple interpreters, take a look.
No more global shared variables.

Cheers,
Vassili

@gmcfarlane
Copy link
Author

gmcfarlane commented Aug 22, 2022 via email

@vassilych
Copy link
Owner

vassilych commented Aug 22, 2022 via email

@gmcfarlane
Copy link
Author

gmcfarlane commented Aug 22, 2022 via email

@vassilych
Copy link
Owner

Not sure what does it have to do with CSCS? You provided C# code, not CSCS...

@gmcfarlane
Copy link
Author

gmcfarlane commented Aug 22, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants