09-03-2006 04:43 AM
I'm getting error while using "Register for Event" node for dynamically registering the events for controls of another VI. But when I use the same method and gives reference of controls of current VI to Register for Event" node, I don't get any error.
I pass the reference of controls of current VI or another VI, to "Register for Event" node by using following method,
Open VI reference, pass it to property node and select property "Front Panel", and then pass this Front Panel Reference to another Property node and select "Controls[]" property for getting an array of references to all controls, filter the reference u want or use complete array of references and pass to "Register for Event node".
When the path of current VI is given to "Open VI reference" function, there is no error and the events are registered for those controls. But when path of another VI is given to same "Open VI reference" function for registeration of controls of another VI, the "Register for Events" node gives an error with error code 1011.
Can any body guide me, whats the problem.
09-04-2006 01:32 AM
09-04-2006 07:37 AM
The attached Example.zip contains three VIs. HomeForDynamicEvents is the main VI which load other two VIs (Meter.vi and Sum.vi) in its subPanel. All these three VIs have "Click" button control. A Ring Control "Monitor Click on Click button of:" let the user select the VI whose click button control will be registered for mouse up event. When the mouse up action is done on any click button, the program is coded to popup a message saying that Click button in the respective VI is clicked.
When this VI is selected from "Monitor Click on Click button of:" ring control before running VI, the registeration of mouse up event for "Click" button is done perfectely alright and the "Register Events" node donot give any error in "error out (Register Events)" error cluster. But when "Meter VI" or "Sum VI" is selected from "Monitor Click on Click button of:" ring control before running VI, the registeration of mouse up event for "Click" button of the selected VI donot take place and the "Register Events" node gives an error message "Register For Events in HomeForDynamicEvents.vi" with error code number 1011 in "error out (Register Events)" cluster. The registeration process is same for controls of other VIs, so whats the problem, if u could please guide.
09-04-2006 09:25 AM - edited 09-04-2006 09:25 AM
Message Edited by TonP on 09-04-2006 04:25 PM
09-04-2006 09:59 AM