I have a large application with whose front panel has many controls\indicators. As such, this main (top level) VI call many parallel mutithreaded subVIs that execute the main code, each of which must update\change particular controls\indicators depending on what's going on in the subVI. To do this, I created a functional global that stores a reference to each (top level VI) control\indicator in an array along with a string array that contains their labels. Because they are stored in an array, all the references are generic control references.
To update a particual top-level indicator from a subVI, I search the string array for the appropriate label, and then index the generic array. I then create a strict reference constant (from the top-level VI control\indicator) and use that to typecast the generic reference with "To More Specific Class." This gives me a local reference to the top-level VI control\indicator and allows me to update values, hide\show, and\or enable\disable these controls\indicators from the subVI.
This works great when I run the program from the LV developement environment. However, when I compile the application to an executable, I get a -1055 runtime error (invalid reference). Does anyone know why this is?