User | Kudos |
---|---|
6 | |
2 | |
2 | |
2 | |
2 |
Interfaces are a great improvement in LabVIEW OOP. For me steepest learning curve was in figuring out how to implement default behavior when interface class doesn't have a private data control.
For example I have created Collectable interface (inspired by iterable interface found in other languages). It has default implementation for methods like Next and Add. It has accessors methods like Read and Write Items, which descendants must override.
When I create a new class which inherits from my Collectable interface, I need to override those accessors, and manually add required controls to new class private data control, and unbundle/bundle elements, and wire the controls and indicators.
data accessors
My idea is that there should be a tool to do automate this code generation.
I think the straight forward way would be to use scripting and project providers to create something similar to Actor Framework Create message etc. tools.
But a more fundamental change would be to implement this as part of property definition folders and property nodes. Which I think in this case should be in protected scope by default.
property nodes
The Collectable interface can be found from lavag.org
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.