Quantcast
Channel: LabVIEW topics
Viewing all articles
Browse latest Browse all 66676

OOP usage in UI

$
0
0

I'm an old hand at LabVIEW in general, and using Object Pascal, C++, etc (other object-oriented languages), but I'm trying to use LabVIEW objects and not having any luck.

 

I understand the trivial examples, about graphical shapes, and such, but I see no example making a real use of them.

 

Consider this:

I have a SCALER, which is a cluster of {A,B,C,D,E,FullScale, all numbers}.  I'm thinking of making that a class, so I do that.

 

I have a CHANNEL, which has a NAME, an ACTIVE switch, and a SCALER.

 

If I put the SCALER.lvclass into the private data for CHANNEL, then I get a icon of a box. It's pretty and all, but not useful for a user interface.

 

If I put the SCALER.ctl into the private data for CHANNEL, then I get the cluster I want to see.  But it's not an object.  If I want to use the SCALER object methods on this data, the I have to create an object and set it to this value, don't I?

 

That's hardly a sensible approach.

 

I have a MODULE, which has a MODULE TYPE, some module-level stuff, and an array of CHANNELs.

Now, for reasons I don't understand, If I put a CHANNEL.ctl -OR- a CHANNEL.lvclass into the array in MODULE's private data, I get an array of the box icons.  That's hardly useful for UI.

 

Are LabVIEW objects just not suitable for UI purposes like this?

 

Or is there something else I've missed?

 

 


Viewing all articles
Browse latest Browse all 66676

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>