LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Inheritance

LV2013 (moving to 2016 soon).

 

Imagine an ENUM called "Units" with the following choices:

  PSI

  INH2O

  mmHG

 

(My real one has lots more values, but this will suffice).

 

This is a TYPEDEF - call it "UNITS MASTER".

 

Here is what I WANT:

1... A TYPEDEF that is a CHILD of the above UNITS MASTER, call it "UNITS A" , set to 15 point plain black font, suitable for normal controls.

2... A TYPEDEF that is a CHILD of the above UNITS MASTER, call it "UNITS B", set to 20 point bold italic yellow font, suitable for indicators in certain places.

3... A TYPEDEF that is a CHILD of the above UNITS MASTER, call it "UNITS C" set in some other way.

 

If I change the item list in the MASTER to add "kPA" to the list, I want all instances of any of the above to change to match, WITHOUT changing their font, or other characteristics.

 

If I change the font characteristics of UNITS B, then those changes only apply to instances of UNIT B.

 

Presently, LV2013 will not allow a TYPEDEF to be a child of another TypeDef.

I could enclose the child typedefs in an invisible cluster, but that creates bundling issues.

 

Would a script work to copy the item list from the master to the children?

 

(this is only during development, not runtime).

 

Other ideas?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 3
(3,312 Views)

An XControl. The data type will be the enum. Make the actual control the user interacts with a ring and update its values from another copy of the enum on the facade FP at suitable points (for instance, in the Exec State Change event). In theory, you could even have a single XControl and have the different designs be properties of each instance of the control.


___________________
Try to take over the world!
Message 2 of 3
(3,298 Views)

OK, I know nothing about Xcontrols. WiIl look into it, though.

Thanks.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 3 of 3
(3,289 Views)