Innovyze-ICM-Libraries
Innovyze-ICM-Libraries copied to clipboard
WSOpenNetwork#each_selected bug
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.