LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Quiztus2

Reduced inteface size

Status: New

I understand that empty interface boxes should reflect their purpose, but this design decision wastes too much block diagram space. When using interfaces, explicit type casting is often necessary by definition. Unfortunately, this quickly clutters the block diagram.

Quiztus2_0-1747037507652.png

 

Actor Framework
7 Comments
fefepeto_kb
Member

I like the idea, but might take it one step further: Update the type cast or create a spin off operator, so that able to automatically detect a class connected to its input and then allows selecting parent class or one of the parent interfaces. Then, it could display the banner to help us visually understand what's happening, or have a text based indicator like the polymorphic VIs.

Quiztus2
Active Participant

I am afraid that your suggested polymorphic selector is not very applicable to interfaces since they are often not related to each other.

Actor Framework
Kiwi-wires
Member

Kiwiwires_0-1747622067616.png

Smaller and no bendy wires... 

fefepeto_kb
Member

I meant the polymorphic selector more for the likeness, then the content of the existing one.

Let me explain it a bit further: I think the polymorphic selector could be pre-populated with the classes and interfaces that are valid selections based on the hierarchy and allow an option for browsing the rest of the valid selections via a Browse... entry.

Quiztus2
Active Participant

I think I understand your idea. During edit time, the IDE can anticipate which class is actually on the wire only in trivial cases. Therefore, it is not possible for the IDE to determine which casts are valid. Keep in mind that a parent class can only legally be cast to a child class if it was initially instantiated as the parent. This is information the IDE does not have during edit time.

When designing software that leverages interfaces, you often end up casting from one interface to another, which are only bound by classes inheriting both. If you pass an object to your code during run-time—one that was not part of your project during edit time—the prepopulated list of valid selections will not be particularly useful.

If you still want a specialized "to more specific" functionality for classes and interfaces, where all classes and interfaces in your project and dependencies are populated (polymorphic) with an additional browse button, you should submit a new idea. This would be distinct from this proposal, which is primarily cosmetic.

 

Actor Framework
Yamaeda
Proven Zealot

Wrap it as a helper function? 

Yamaeda_0-1747831890569.png

 

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Quiztus2
Active Participant

While this is a very good workaround, it has some downsides regarding creation time, single source of truth, maintainability and a coercion dot. You also have to make sure that you chose the correct execution behavior, so it adds an unnecessary source of error.

Quiztus2_0-1747905164676.png

 

Actor Framework