04-01-2020 09:33 AM
@PaulOfElora wrote:
This is fantastic, Yamaeda! Guess I was stuck on implementing these ideas. Couple of minor questions:
1) What data would you consider private? From the red key glyphs I assume all 3 elements in the class control. And the two public data are the "Timer event" refnum and the Wait(ms), correct?
2) (newbie question) In the Init VI I notice you 1st got the name of the timer.vi to give to the Open VI Reference function. But you already gave it a strictly typed VI reference - why is it necessary to also give it the name of the VI? Isn't that 'already contained within' the VI reference? The Help says "If you wire a strictly typed VI reference to this input, the connector pane of the VI specified by vi path must match the connector pane of this input." I'm a little muddled on this... Ahh, I'm answering my own question - "type specifier VI Refnum (for type only) determines the connector pane information and data type of vi reference." - so the type specifier is like a function prototype, defining the arguments and value of a function...
1) Class data is always private, but you can have accessor methods.
2) The wire only gives the type, which defines the connector pattern. In this case you can use a property node to get the file name. As a side note this is basically how you implement interfaces, several VI's with a defined connectorpane.
3) G# (see sig) is already reference based and holds all of the class data cluster as one DVR. It might save you a lot of work. 😉
04-01-2020 09:51 AM
ahhh thanks for your patience, Yamaeda
04-01-2020 10:45 AM
@Yamaeda wrote:
3) G# (see sig) is already reference based and holds all of the class data cluster as one DVR. It might save you a lot of work. 😉
The ADDQ link in your signature takes me to a "404 Hoppsan" page, just FYI.
(If you don't mind, might I ask some questions about G#? It might help the OP as well)
Does G# derive from the standard LabVIEW object class? In other words, is it a partner to the standard LV Class, or is it a replacement for the LV object class? Could I stick a regular LV object and a G# object into an array? I haven't needed a by-ref LV class so I haven't played with it. Could you give an example or two of something it makes simpler than standard LV classes? It looks interesting but I'm not sure where I'd use it, as (AFAIK) I've never needed a by-ref class before. I feel like I'm missing out on something cool here.