LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

UnchainCtrlCallback - The User Interface Manager could not be opened

In LabWindows 2010 it seems that the function UnchainCtrlCallback always returns an error code equal to "The User Interface Manager could not be opened".  (I used the GetGeneralErrorString function to convert the returned status code into a string)

 

  1. Used "ChainCtrlCallback" to chain a callback function to a control
  2. Used "UnchainCtrlCallback" to undo the previous call to ChainCtrlCallback

The control was not removed from the panel between steps 1 and 2, and the UnchainCtrlCallback function called is not being executed in one of the chained callbacks.

 

It seems that the function call to UnchainCtrlCallback is functioning correctly despite the error returned.

 

Has anyone seen this before?

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

Hey softeng,

 

I was able to get the UnchainCtrlCallback to work by embedding it into previously working code. Have you tried using the function in another project? I've heard of projects becoming corrupted and returning this message. If any project returns this error, even projects that work on other computers, it could be a corrupt installation.

 

What are you using the Chain to accomplish? Can you execute that code in the original callback without error?

 

 

Kind Regards,

 

Luke W

 

 

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

I tried using the UnchainCtrlCallback function in a different project and I received the same message.  Everything is working correctly even though this error message is being displayed.  Chained callbacks are executed, and when they are unchained they are no longer executed.

 

I am using the chains to inhibit user interaction with controls that are contained in specific sections of panels.  I am searching for all controls in a specified region of a panel, and then chaining an "User Restriction Callback" to the control.  This callback will just return -1 so that the next callback in the chain does not get processed.  I did not want to set a flag in each separate callback function because 1) there are many callback functions in the project and 2) we want to limit the amount of code modifications to the original callbacks.  When I no longer want to inhibit the control, I unchain the "User Restriction Callback" so that the application can be used normally.  The "User Restriction Callback" prevents all types of user interaction (Mouse click, keyboard input, Hot Keys, etc).

 

Is the error message a bug with LabWindows?

0 Kudos
Message 3 of 4
(2,787 Views)

I don't think its a known issue with CVI, I did a search on this document and didn't find any matches for chain or user interface. Also, I don't receive the error when chaining and unchaining on my machine. Could maybe be the unique combination of your system. You may want to try repairing the installation. Also, posting a simple code snippet that exhibits the behavior would allow us to check and see if the same thing happens on a different computer.

 

Happy Holidays,

 

Luke W

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