I have problem that I don't understand tith dynamic event registration.
In my app I have many threads that are initialised when app starts and I switch between them using subpanel.
In one of this modules I want to register some dynamic events to find whitch controll in cluster was pressed.
Why I get error 1001?
I have static reference for all modules in main thread. I start modules but I don't open their FP.
Solved! Go to Solution.
Well your image is confusing because you can't run without wiring that reference. But if you did do that then the error comes from the fact that your VI doesn't have a front panel that is open when you register for it. So that control reference doesn't really exists. I mean it exists but you can't reference a control that hasn't been opened.
I think what you'll want to do is open the front panel, but then set it to hidden. Then after the front panel has been opened, and hidden, register for the control event.
Reference was wired, bad quality image or I misclicked something 🙂
Thanks for help.
I made this module to open its FP before registering for that control event. This time it works without error. Problem was that i couldn't set this module into subpanel since it is open.
Thied in that way: init module and make hidden FP, register event, close FP and it seems to be working and it is confusing... What happens when I close FP is it still in memory?
If it's still running then yes, it is still in memory. I've just done something very similar to you (loading user interface VIs into a subpanel) and did the same method - open the front panel as hidden and then close it before putting it into the subpanel.
as the other posters have said, this occurs because LV will not let you register an event for a control that has not be loaded into VI Server via the opening of that control's VI. As a workaround, you will need to open the subVI and hide it before the event registration occurs. As long as the VI is in memory for some reason (open reference or other, here is some more information).