LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Common Class Data for Child Classes

I have a parent class and several child classes.  Each child class has different class private data; but a subset of that data is the same for all classes.  I would like to make a single pair (read/write) of accessor VIs for the common data.  However the way that seems like it should work doesn't (see example "Try Read-Write Child Common Data.vi" in attachment.)  It seems that each instance of a child class contains 2 copies of the common data: one for the parent class, and one for the child class.  Is it really necessary to create separate accessor VIs for the common data in each child class?

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 1 of 2
(2,051 Views)

Make a VI to read the PARENT DAta and just use that on the Child object.  YOu don't need to have the data in both the Parent and the child, only the parent.

0 Kudos
Message 2 of 2
(2,040 Views)