From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic event registration - array of event registration refnums

Hello,

 

I have array of classes, class has generates user events, I want for user to be able to recieve those events but without direct access to event itself (he can not close or generate event)

 

pawhan11_0-1575406873007.png

 

It seems that it is not possible to directly connect array of event registration refnums to event structure.

Another approach would be to convert array to cluster but that requires knowing array size ahead.

Next solution would be to create wrapper class with access to events, it would register to array of user events.

 

Is there better solution or am I missing something?

 

Thanks!

0 Kudos
Message 1 of 4
(2,079 Views)

Could you make a single event, with part of the event data being a unique identifier of who is firing the event?

 

Even if registering for an array of events were possible, I don't know how you would configure the event structure to handle an unknown number of events.

0 Kudos
Message 2 of 4
(2,048 Views)

The number if event registrations must be known at edit time.

Changing the number of registrations that are handled requires changing the event structure (either by changing the events handled by a case, or by adding/deleting case(s)).  And of course editing the event structure can only be done at edit time.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 4
(1,993 Views)

If the number of events is known at edit time, which to Paul's point it must be, then you can at least name the events for the purpose of labeling the event structure consistently like this:

 

Dynamic User Events.png

to get something like this:

 

Dynamic User Events 2.png

_______________________________________________________________
"Computers are useless. They can only give you answers." - Pablo Picasso
0 Kudos
Message 4 of 4
(1,929 Views)