LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XControl always locked when used in class -- possible bug?

Solved!
Go to solution

Hi,

 

This is not dissimilar to this question. However, I think that the issue is slightly different and possibly a bug. If do the following:

 

  1. create a project,
  2. create an XControl,
  3. create a class,
  4. add an instance of the XControl to a class method

you should see that the XControl is locked all of the time. This only occurs when the XControl is used with a class. If the XControl is placed on a VI, in a project library or not, the XControl will only be locked when the VI which is using it is open (i.e., in memory and the XControl is running).

 

This may be expected behaviour due to the way classes are loaded; however, as a user I find it unexpected -- is it a bug?

 

Regards,

Steve.

0 Kudos
Message 1 of 3
(2,177 Views)
Solution
Accepted by topic author St3ve

Unlike normal libraries (.lvlib), classes always load all their member VIs into memory when the class is loaded into memory.  So if one of those VIs uses an XControl, then it will become locked as soon as you load the owning class into memory, even if the VI is not open.  You might be able to get around this by right-clicking the XControl in the project and selecting "Unlock Library for Editing".  This will temporarily break any VIs that call the XControl until you are done editing it.

 

Chris M

Message 2 of 3
(2,171 Views)

Chris,

 

Thanks for the speedy response. I suspected that classes did that (and thought I had read it somewhere) but couldn't confirm it.

 

EDIT:

For anyone interested: the "Unlock Library For Editing" option will allow you to edit the XControl.

 

Regards,

Steve.

0 Kudos
Message 3 of 3
(2,150 Views)