LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

BUG: Core function using deprecated code

Solved!
Go to solution

The "Three button dialog core.vi" uses FP.open properties instead of invoke node Front panel:Open/Close (LV2018). That's been deprecated for quite a while by now.

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

Qestit Systems
Certified-LabVIEW-Developer
Message 1 of 8
(1,660 Views)

But it works, right?

 

(Who uses that dialog anyway 😉)

Certified LabVIEW Architect
0 Kudos
Message 2 of 8
(1,636 Views)

@Yamaeda wrote:

The "Three button dialog core.vi" uses FP.open properties instead of invoke node Front panel:Open/Close (LV2018). That's been deprecated for quite a while by now.


Sometimes you write code when you are first learning LabVIEW and even though it works well, you are perpetually embarrassed whenever other developers look at the BD.

 

AQ once told me that he would go back and clean up his mess.  I assume nobody wants to develop a full set of regression tests.  

 

Of course,  I don't use any built in dialogs.  

  • They poll rather than use Events
  • They are saved with "Dialog" vi properties rather than setting those only at runtime ( Silly way to ask for a three-finger salute in development) set fp.behavior and fp.closable in your dialogs
  • The buttons are too big unless you absolutely must waste space in case of localization.
  • The BD would be improved with CTRL+U
  • No error handling on the property nodes but, nice sequence structures instead
  • VI documentation does not meet my standards

In my opinion,  TBD Core.vi has been obsolete since version 6.

 


"Should be" isn't "Is" -Jay
Message 3 of 8
(1,592 Views)
Solution
Accepted by topic author Yamaeda

In LV2021 it looks like this in the last frame:

thols_0-1668586312661.png

 

So just upgrade LabVIEW 🙂

 

 

Certified LabVIEW Architect
Message 4 of 8
(1,544 Views)

@thols wrote:

In LV2021 it looks like this in the last frame:

thols_0-1668586312661.png

 

So just upgrade LabVIEW 🙂

 

 


That method is exactly what the complaint was.

 

Essentially,  TBD Core, fills in the button text before showing the FP.  Really,  that isn't a bug.  In fact, it's desired since all the p node writes have to happen in the UI Thread and having the text change while the FP is visible and then moving the FP to center it would be a rather poor UX.  This actually is a proper use of the FP.Open method.

 

Not a bug but, yeah, the code could look nicer.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(1,518 Views)

@JÞB wrote:

@thols wrote:

In LV2021 it looks like this in the last frame:

thols_0-1668586312661.png

 

So just upgrade LabVIEW 🙂

 

 


That method is exactly what the complaint was.

 

Essentially,  TBD Core, fills in the button text before showing the FP.  Really,  that isn't a bug.  In fact, it's desired since all the p node writes have to happen in the UI Thread and having the text change while the FP is visible and then moving the FP to center it would be a rather poor UX.  This actually is a proper use of the FP.Open method.

 

Not a bug but, yeah, the code could look nicer.


If I understood the OP correctly, his complaint was about the node being deprecated but in use in LV2018. In Later LV-versions, that is corrected, which I showed. I did not mean anything about it being incorrect. I don't know how the code looks like in 2018 but I assume the behavior is maintained although the deprecated node is used. 

 

I especially like this part of the code:

thols_1-1668608497411.png

If anything, Three Button Dialog should be deprecated 😀

 

Certified LabVIEW Architect
0 Kudos
Message 6 of 8
(1,513 Views)

Exactly, that's how it should be. When they deprecate code and suggest we use something else i don't expect to find it in vi.lib. 🙂

And you know very well i don't decide the version at this place. 😉

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 8
(1,499 Views)

@JÞB wrote:
That method is exactly what the complaint was.

The complaint was about using the property (https://labviewwiki.org/wiki/VI_class/Front_Panel_Window.Open_property), which the TBD certainly did use until recently.

Message 8 of 8
(1,497 Views)