11-09-2017 08:39 AM
I observed this behavior in LabVIEW 2016. A simple example that you may use to reproduce this is attached.
I created a dynamic dispatch method (Open) in a parent class (Logger). In a child of Logger (Event Logger), I created a method (New File with Header) and placed the parent method Open on its block diagram.
If I right-click on Open and choose Find Callers, Open is not found. If I change Open to a static method, then Find Callers is able to find it.
My primary question is: Is this behavior intended?
Secondary discussion: Perhaps creating a dynamic dispatch VI, not overriding it, and using it in a child method is not an ideal approach (if so, LabVIEW not finding its callers is a subtle way of enforcing the point). Alternatives are to just make it static instead, or to override it with a child Open that simply calls the parent (Find Callers is able to find it in that case as well). I am open to your opinions about this.
Solved! Go to Solution.
11-10-2017 10:59 AM
Hello,
The fact that Find Callers is not able to do so when using a dynamic dispatch method is expected. Since the method is called dynamically, it is not recognized as part of the call chain in the project.
All three of your suggestions in your secondary discussion are valid. If you don't need to override using the child, changing to a static method makes the most sense. If you may need to override in the future, you should make it dynamic.
Have a great weekend,