LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV does not Find Callers of a parent method inside of a child's (different) method.

Solved!
Go to solution

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.

0 Kudos
Message 1 of 2
(2,107 Views)
Solution
Accepted by topic author PTortora

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,

Aaron Douglass
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,055 Views)