LabVIEW Idea Exchange

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

Option in New Override VI Dialog to use the Dynamic Dispatch Template Instead of Override Template

Status: New

This is one of those penny-saved-is-a-penny-earned things.  In this case the penny is a few seconds of my time.

 

When I stub a method in a parent class and require all descendants to override the parent, I don't actually want to override the parent, I just want to implement the method in the ancestors.

 

There are two ways I can do this:

  1. Create a new VI for override, delete the Call Parent Method, create a new case structure, enlarge the working area, and then start coding.
  2. Create a new dynamic dispatch VI and then save the VI with the correct name.

I'd like LabVIEW to recognize that I've checked "Require descendant classes to override this dynamic dispatch VI" and not checked "Require overrides of this dynamic dispatch VI to always invoke the Call Parent Method node" and give me an additional check box in the New VI for Override dialog to use the dynamic dispatch template instead of the override template.

 

My new way of doing this would be:

  • Create a new VI for override and place a check mark in the box.

 

2011-06-17_144145.png

5 Comments
AristosQueue (NI)
NI Employee (retired)

A not unreasonable request. Kudos!

David S.
NI Employee (retired)

I had trouble reading this idea until I realized that "ancestors" should be changed to "descendants". But even with that fix, I still don't really get what you're looking for. What's the "override template"? Is that the connector pane exposed by the method that must be overridden in descendant classes? If so, doesn't it make sense that you'd want to use that pane when creating a new override method, since you can't compile unless all dispatches of that method have the same connector pane?

David Staab, CLA
Staff Systems Engineer
National Instruments
Pie56694
Active Participant

Maybe pictures will help me explain.

 

In this project --> 2011-06-20_125554.png

Stub - Must Override.vi is configured like this -->

In case it's unclear, there's nothing in this VI other than

the connector pane, it's just a stub.

2011-06-20_125725.png

Instead of this dialog -->

I want the one in my original post

2011-06-20_125744.png
When I enable the new option, instead of this template --> 2011-06-20_125806.png
I get this one --> 2011-06-20_125927.png

 

I'm not going to argue that it's a big deal, but it would be nice.

PaulLotz
Member

I have wished for this many times!  (The only change I would make is not to include the error cluster either, since 99% of the time I delete that, too.  I'm guessing others would disagree so maybe it could be an option?)

PaulLotz
Member

Correction and addition:

I said error cluster.  I meant the case structure (to which we are wiring the error cluster).

I found that I could achieve this already by modifying (after backing up the existing file, of course!) ...\LabVIEW <2011>\resource\Framework\Providers\LVClassLibrary\CLSUIP_MemberTemplate.vit.

 

I am still very much in favor of the original idea posted in this thread!  More often than not I do not wish to call the parent method when I create an override method.