LabVIEW Idea Exchange

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

Register User Event as Filter event

Status: New

Citation from LV help: "LabVIEW categorizes user interface events into two different types of events: notify and filter.".
But, User Events could be registered just as notify events.
Idea is to implement to LabVIEW possibility to handle User Event as Notify event (as it is done now), and as Filter event.
Usecase: Actor Core is used as user interface, and multiply instances are displayed in multiply subpanels. They receive Name + Data payload by same user event, and need to process just their payload (if actor's name == payload's name). If they receive payload without their name, they drop event, do not process data. Currently one could solve it with case structure or something like this, but while having Filter User Event, it would be possible just to filter out event, and drop it.

2 Comments
AristosQueue (NI)
NI Employee (retired)

This is a novel idea, at least to me. I don't know that I've ever wanted this feature, but it is a new idea, and therefore, worth thinking about. I'll add my kudos.

 

User could create a new user event, then, when an event structure registers for the event, user could set it to register either for the Filter version or the Non-Filter version. When the event is generated, all the handlers of the Filter versions would fire first, and only if they all said "false" for "discard?" would the Non-Filter versions fire.

 

The Actor Framework use case described isn't actually a good scenario -- the case structure (mentioned in the original idea description) is a far more efficient mechanism (less data copying, higher throughput) if an event structure is going to filter its own events. But if you had some structures that were filtering the events for other structures, that's when this could become useful.

wiebe@CARYA
Knight of NI

Somewhat related: User-Event-return-value.

 

Not the same, actually the details (ability to Discard?) seem to conflict.