Genie Discord forum

Author Avatariamcomcy
6/19/2023, 7:46:51 PM

Experimental changes to TodosMVC sample app. Added this to a template HTML view file:

<% for_each(hierarchy) do (ont_text, surveys) %>

Onit: $(ont_text)

<% for_each(surveys) do (survey_text, questions) %>

Survey: $(survey_text)

<% end %> <% end %>

Many experiments. Inner most loop always works even 4 levels deep, but only ONCE, which seems to indicate the outer loops don't. Please note, using "for_each" here. Nested "for" loops don't work AT ALL.

I searched for 'nested loops' here, but got no results. Seems it's just me. What am I missing?

Oh, and this code in Julia, works perfectly with for_each or for:

for_each(hierarchy) do (ont_text, surveys) println("Onit:", ont_text)
for_each(surveys) do (survey_text, questions) println("Survey: ", survey_text) for_each(questions) do (question_text, answers) println("Question: ", question_text) for_each(answers) do (answer) println(answer) end end end

Author AvatarPere
6/20/2023, 2:10:43 PM

Thanks for bringing this up. I've shared this with our devs and they would like to follow up on this. Could you open an issue on GitHub with a minimum working example to highlight the issue?

Author Avatariamcomcy
6/21/2023, 6:53:12 AM

Sure, give me a link and I will certainly do that

Author AvatarPere
6/21/2023, 8:59:32 AM

please check the link in my post above