08-02-2016 12:54 AM
Hi all,
I am new to LVOOPs and trying to figure out things. I have a parent class named "Vehicle" under which there is a "Bike" class. The Bike class has two children A and B. To each class A and B I created Object instances and upcasted them Using "To more generic functions" to vehicle class. Now I am not able to access any of the VIs under any class using this newly created object instance. Can anyone explain me why? being new to LVOOPS I find it difficult to understand this. Thanks for the help in advance.
08-02-2016 03:41 AM
Why are you using "to more generic" at all? It sounds like you messed that one up.
I assume that you are looking for dynamic dispatching. Please review the LVOOP examples for this.
Norbert
08-02-2016 02:23 PM
You can only use VIs that the "wire" (aka class) knows about. If you up cast to a parent calss there has to be a VI in the parent class if you want to use that VI. Any VI (marked for dynamic dispatch) in a child class can over-ride the same named VI of the parent.
Ben