JKISoftware / JKI-State-Machine-Objects

Object-oriented framework for LabVIEW based on the JKI State Machine
BSD 3-Clause "New" or "Revised" License
95 stars 54 forks source link

FindDependency(byKey) reports dependency found even if SMO has no dependencies. #75

Closed gcodetechnology closed 2 years ago

gcodetechnology commented 2 years ago

Description SMO dependency is reported to be found even when none exist.

To Reproduce Use FindDependency(byKey).vi on any SMO subsystem that has no dependencies.

Expected behavior The "Found?" output of the function should return False.

FindDependency(byKey)
francois-normandin commented 2 years ago

Totally right. And I can't even blame the OR'ing of an empty array for this. There's actually another bug on that screenshot: an empty string in the key input coupled with an invalid (just destroyed) dependency, might result in found=true. Not very likely, I know, but still possible.

Solution should therefore filter for both empty array of dependencies and for empty key input.

Thanks Eric!

francois-normandin commented 2 years ago

Here are the proposed fixes that will be available in the 1.4.0 branch until released.

image

francois-normandin commented 2 years ago

Done. In feature/stable140 branch until released