User | Kudos |
---|---|
11 | |
7 | |
3 | |
2 | |
2 |
When creating VIs in a class that are meant to be overridden, it would be nice to have a template VI that will be used as the template. The easiest way I though of to accomplish this is to create an Override template that has the same name as the VI but with an extension like .OVIT (Override VI Template).
An new item can be added to the context menu when right-clicking on the class to Create New Template for Override VI, which will give you basically the same format as a new vi from dynamic dispatch template, but will include the call parent VI followed by an error case structure.
This will allow an architect to create a template for coders to use and place any useful information on the Front Panel or Block Diagram. When the override vi script runs to create the new override VI from MyOverride.vi, it can search for MyOverride.ovit and if found replace the base class' type with the child class' type. Otherwise you get the default VI which has the call parent method.
I know this idea has been pass around before, but I thought I would respire it.
My goal is to allow architects to give more meaning full information to other developers and more complete starting points for overridden class VIs.
Issues that can arise
What if the VI is renamed? Then the maintainer of the class will need to also rename the template VI, but it would be nice if LabVIEW did this automatically.
What if the VI is removed from the project? The OVIT would also be removed.
What if the OVIT is broken, ie. won't execute? Like all class VIs, it should not be broken, the template should contain working code or disable parts that need to be implemented. It would be nicer if the OVITs were ignored for borken code and not allowed to be place on the block diagram for execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.