04-03-2017 11:42 AM - edited 04-03-2017 11:43 AM
When I use my classes, other Vis change properties of class when I change they in a class. The type definitions do the same. So what is diferent?
04-03-2017 12:21 PM
Hi Forest, you have observed that classes are basically a fancy typedef cluster, but there are some other implications. With a class, you can inherit from other classes, not so with typedefs. Also with a class, the data is private, and can only be accessed by VIs within the class. A typedef (with public scope) can be accessed from anywhere.
This is just a quick answer, you can find many-paragraph articles on LabVIEW object oriented programming which will give you more info.
04-03-2017 01:20 PM
Dynamic Dispatching
Dynamic Class instaciation
Support for class definition chages
Fancy wires
the opportunity to use the word "La-Voop" in every other sentence.
Ben
04-03-2017 01:33 PM
It's also worth noting that in classes, the default values are part of the definition of the class where for a type definition they are not.
That means that if you put a class constant on a block diagram and update the defaults you'll be updating the constant, but if you put a type definition constant down on a block diagram and update the default values of the typedef, all of your existing code won't have the new defaults but if you add a new one somewhere it will.