LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Get the control references from Dynamic Event Registration refnum

Solved!
Go to solution

I typedef'd it because more than one VI will use the input (not at the same time of course). I agree that using a class is also an option (maybe even a better one), but right now a typedef'd cluster looks good enough to me and more within my comfort zone.

0 Kudos
Message 11 of 15
(404 Views)

@1984 wrote:

I typedef'd it because more than one VI will use the input (not at the same time of course). I agree that using a class is also an option (maybe even a better one), but right now a typedef'd cluster looks good enough to me and more within my comfort zone.


Sure, suit yourself. Nothing wrong with it, but I tend to find it a waste of time iff used only once or twice. Obviously a type def can safe lots of time.

0 Kudos
Message 12 of 15
(399 Views)

Nearly 100% of the times I overlooked typedefining a cluster or an enum I had to do it later.

But I'm not currently in the OO business.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 13 of 15
(397 Views)

@pincpanter wrote:

Nearly 100% of the times I overlooked typedefining a cluster or an enum I had to do it later.

But I'm not currently in the OO business.


I had that at first (let's say the first 15 years 😊), but now I hardly ever need to change to a type def afterwards.

 

There isn't a real downside, except when your code gets really big. If you have 180 type defs that are just used to bundle an input, to me the type defs gets less practical than they are useful. Also, those clusters tend to be reused, and this could mean more tight coupling than needed. This is also a 'big project' problem, that you can often get away with.

 

There's no type def law nor a type def police. Just saying that if you don't really like to make them type defs, there are times when it's fine to not make them. If you do like it, it's fine by me, and it isn't even up to me.

0 Kudos
Message 14 of 15
(383 Views)

@pincpanter wrote:

Nearly 100% of the times I overlooked typedefining a cluster or an enum I had to do it later.

But I'm not currently in the OO business.


This must be common enough that, starting with LV 2018, the "control" selection when you right-click on a folder and select "new" in your project has been replaced with "typdef".

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 15 of 15
(367 Views)