jpaulm / drawfbp

Tool for Creating and Exploring Flow-Based Programming Diagram Hierarchies
http://www.jpaulmorrison.com/fbp/
145 stars 20 forks source link

Lockup on code generation if port name is missing #60

Closed bergm closed 3 years ago

bergm commented 3 years ago

When generating code for a flow when a port name is missing, drawFBP freezes. Just create two processes, connect them and remove one port name. When creating the code, the window freezes and one has to kill the process.

jpaulm commented 3 years ago

Thanks Michael, that's a big help - hope to deliver a new version within the next week...

Cheers

jpaulm commented 3 years ago

Fixed as of v2.22.4 - at least, doesn't lock!

Question for @bergm : should users be forced to enter a port name? Thanks

bergm commented 3 years ago

Question for @bergm : should users be forced to enter a port name? Thanks

As of your philosophy of not forcing much at a certain point in time, I would say no. At any point a user might not know the port name (yet). IMO, It would be best (from a useability point of view) to mark a missing port name in an obvious way, so the user has a hard time missing it. Or maybe alert him when he wants to generate code. A further reason for not enforcing it, is that you used it to create flows for all kinds of illustration purposes. And maybe one just doesn't want to show a port name because it's unnecessary detail. All in all I kind of learned to appreciate your stance of not forcibly coupling code and diagram elements in time and space, like most other tools do.

jpaulm commented 3 years ago

Important point! I am now just generating a message if you decide to generate code... If the port name is omitted, I am now also putting a question mark in the port number in the generated code... Thanks, as always!