LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Mr._Jim

Event Structure: Dragging a Terminal to Automatically Select an Event Source

Status: New

Folks,

 

I think it would be nice if the following were true:

  • Drag a control or indicator's terminal into an event structure while holding down Shift, Alt, or some other key.
  • The "Edit Events" dialog subsequently opens with that front panel object already selected as an event source.

This would save the developer from having to navigate through the event sources tree every time s/he wishes to add an event for a control.

 

Was something similar already suggested?

 

Thanks very much,

 

Jim

12 Comments
AristosQueue (NI)
NI Employee (retired)

I like the idea generally. Let me suggest a slight amendment: if you drag a terminal into the ring area of an event structure -- where items generally cannot be dropped -- LV treats that as a signal to open the Edit Events dialog with that item selected. That way we wouldn't need to have a meta key (shift, alt, ctrl, option) to trigger this behavior. If the ring highlights itself as a drop target when FPTerminals are dragged over it, that might make this shortcut feature more discoverable than if users have to know to hold down a meta key.

 

Thoughts?

JackDunaway
Trusted Enthusiast

Where does the terminal land?

AristosQueue (NI)
NI Employee (retired)

In my ammended idea? The terminal wouldn't move. It would be just like dragging a subVI node onto a path constant. When you drop it, the path constant becomes the path of the subVI, but the subVI node is still where it was before the drag. Same behavior occurs when you drag a subVI onto a static VI reference node.

Mr._Jim
Active Participant

Hey, that's even better!  Not having to remember extra keystrokes makes it even more intuitive.

 

Both amendments sound great: dragging to the "ring" or "selector", and leaving the terminal as-is after the user performs the action.

 

Very, very good ideas.  Thanks for improving mine.

altenbach
Knight of NI

How about a right-click command:

 

"Create value changed event for all controls contained in this event case".

 

Now it's easy to edit the event and delete or modify what we don't want.

Mr._Jim
Active Participant

Darn! Beat me to it!

 

I was thinking about how to ask for that functionality earlier and didn't think of a context menu selection.  It's true; about 99% of the time I use a "value changed" event for controls and I'm guessing that a lot of other developers do, too.

 

Wow, that would make life easier, especially for the times when there are 10+ controls from which the event is triggered.

AristosQueue (NI)
NI Employee (retired)

Hm... the context menu solution is interesting, but I don't like the order of operations. Here's how it plays out in my head:

 

The FPterminal has to be inside the Event Structure so that LV knows which event structure you want to add to... but to have the FPTerm inside the structure means you've already created the event frame... and to have the event frame you have to already used the events dialog that asks you to choose the event to be handled... which is what you're trying to avoid.

 

Mr._Jim
Active Participant

On that note, I think we've diverged into two separate requests:

 

1. Being able to add a new event frame by dragging a terminal into the selector

2. Being able to add more event sources to an existing event by moving more terminals into that frame, and then using a context menu selection.

 

I'm trying to think of how we could streamline the second item to make it as intuitive as possible.

altenbach
Knight of NI

Aristos wrote:  Here's how it plays out in my head

 

I guess my head is different, but I see your point. 😄 I typically place an event structure and wire up some code in the already existing timeout case (I rarely use the timeout event). After that I add the value change events.

 

Maybe if we had an option to add an event case silently that would create an empty event frame, but not trigger the event configuration dialog. (silently add event case, silently duplicate event, etc.) ...

 

mactierney
Member

I love this idea. I hate having to search through the list to add an event, expecially since the order of the list is based on date of object creation rather than alphabetical.