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

WSOpenNetwork#each_selected bug #7

Open
sancarn opened this issue Jul 10, 2018 · 0 comments
Open

WSOpenNetwork#each_selected bug #7

sancarn opened this issue Jul 10, 2018 · 0 comments

Comments

@sancarn
Copy link
Owner

sancarn commented Jul 10, 2018

We noticed today that WSOpenNetwork#each_selected seems to be asynchronous such that:

net.scenarios do |scenario|
  net.current_scenario = scenario
  net.each_selected |obj|
    puts scenario
  end
end

And your scenarios are ["CAB","KST","PLT"] then you would expect the output:

Base
CAB
KST
PLT

But instead you get the output:

PLT

Ultimately the definition should define this behavior as follows:

Each_Selected schedules an event to loop over all selected objects. The block is called asynchronously to the rest of the code. I.E. It runs last.

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

No branches or pull requests

1 participant