LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Bug/enhancement: Representation of Fixed Constants (Scripting)


@DFGray wrote:

Style is a modifier of object class.  As such, there is a many to one correspondence between style and object class.  For example, a FixedConstant can be π, +∞, -∞, NaN, etc.  Controls are another good example.  And, unfortunately, there is no good way to determine the style of an object from its reference.


I was wondering about it the other way around -- given an object with a given Style, then it must have a certain object class.  Is that mapping available?

0 Kudos
Message 11 of 12
(202 Views)

@GregSands wrote:

@DFGray wrote:

Style is a modifier of object class.  As such, there is a many to one correspondence between style and object class.  For example, a FixedConstant can be π, +∞, -∞, NaN, etc.  Controls are another good example.  And, unfortunately, there is no good way to determine the style of an object from its reference.


I was wondering about it the other way around -- given an object with a given Style, then it must have a certain object class.  Is that mapping available?


LV never seems to have a problem telling us what something isn't, so much harder to figure out what it is...
The Style mapping would be interesting.  I usually try to create objects with the least specificity necessary.  That means I use GObject and Node classes a lot.  Lets me reuse a lot of code with the additional cast when I need a more specific class.
I could envision something like the Class Browser (oddly enough), search for a Style and have it create the Class Constant.
0 Kudos
Message 12 of 12
(199 Views)