JLuebben / Floppy

Flowchart Python -- A multipurpose Python node editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ForEach Node has no run function

k-eks opened this issue · comments

The forEach node had no run function and did therefore not run properly. I fixed it in my fork 41c5c03

Are you sure that is needed?
The 'ForEach' Node is almost fully implemented in the 'ForLoop' Node and the 'ForEach' Node worked as expected.
To recycle as much of the Node's code as possible I made the 'ForLoop' Node abstract and reused part of its implementation for the 'ForEachAtomPair' Node. Admittedly not the cleanest solution but I was in a hurry. :)

I think, a simple, non-specific for-each-node is not only handy but important for batch file operations. Here is a quick example:
screen shot 2016-09-15 at 16 17 13

I will re-implement the ForLoop class and its children to make the intended design clearer/cleaner.

I'm not sure if it's a bug or my sloppy re-implementation of the ForEach node but the second ForEach does not trigger the first.
Edit:
I just checked the console output, the last node run was the ReadAtoms node, it seems to me that the ForEach node does not like to be executed a second time.

ForLoops did not consider that the TRIGGER input is optional. 9a69932 should fix that.