LabVIEW Idea Exchange

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

Polymorphic One Button Dialog

Status: New

The one button dialog is a great tool when debugging code. It's very convenient to wire a string to the dialog to probe data when regular debugging techniques are not available. There are times when it would be handy to wire a non-string data type and not have to either convert a number or a boolean to a string. Formatting should be limited (for simplicity) such that data types like arrays and clusters would need to be handled by the user.

 

onebutton.jpg

George M
National Instruments
8 Comments
chris.b
NI Employee (retired)
Amen, George!
Chris Bolin
LabVIEW Partner Program, CLA
Darren
Proven Zealot

I like this idea, and I think we can support more complex data types relatively easily...just format the string like the Probe Watch Window does it:

 

probe_strings.png

 

-D

gmart
NI Employee (retired)
We could use the same formatting that the probe window does for complex data types. I think default formatting (even for doubles) can get complicated since one person's ideas of acceptable is different that another. The easy out is if you don't like what is presented, you can always format it how you like and turn that into a string.
George M
National Instruments
tst
Knight of NI Knight of NI
Knight of NI
Incidentally, you can implement something along these lines today if you simply create your own dialog with a variant control.

___________________
Try to take over the world!
AristosQueue (NI)
NI Employee (retired)

> We could use the same formatting that the probe window does for complex data types.

 

As long as you hide all the private data for LV classes. The probes expose that but runtime displays should not. I would not be opposed to a standard ToDisplayString.vi that any class could override to provide its string display. We've certainly talked about such but not really gotten to implement it.

crelf
Trusted Enthusiast

@Aristos Queue wrote:

As long as you hide all the private data for LV classes. The probes expose that but runtime displays should not.


Agreed.





Copyright © 2004-2024 Christopher G. Relf. Some Rights Reserved. This posting is licensed under a Creative Commons Attribution 4.0 License.
daveTW
Active Participant

Hello gmart,

 

why not implementing your own polymorphic VI, with autoselecting enabled? This would do it. Today!

 

Greets, Dave

Greets, Dave
gmart
NI Employee (retired)

While you could write a Poly VI, that would require six VIs (plus the poly) for my example above. If I'm debugging across many machines, that means carting that code around to each machine. Having the native one button dialog handle the types would be more intuitive and convenient.

George M
National Instruments