07-27-2012 12:47 PM
Let's use Read Key as an example (from the Configuration File VIs).
I want to wrap Read Key (which is Polymorphic) so that some other code always runs right before Read Key. However, to do this, it seems I have to make an instance of the wrapper VI for each output type that Read Key supports if I want it to support all the types. This is disappointing since in C++ or Java you'd just use a template or generic and you wouldn't need to do all this extra work. Is there a way around this when working with Polymorphic VIs?
The alternative is to always remember to put this code right before Read Key. Another less than optimal solution. If I want tightly connected and cohesive code, I want one VI and not a half dozen of them!
Anyways, this is almost certainly not possible so I guess this is more of a complaint haha.
Solved! Go to Solution.
07-27-2012 12:56 PM
Vote up this idea in the LabVIEW Idea Exchange:http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Provide-a-better-way-to-implement-a-polymorphic-VI/idi...