LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
Intaris

Warnings when choosing reserved Property node names for XControls

Status: New

I recently had a tough nut to crack.  I had created an XControl whose "Label" (i.e. Visible name) I wanted to be able to change at run-time.  This was a label INSIDE the XControl, not the label of the XControl itself.

 

My naive self decided to create a property node named "Label" with a read and write VI.

 

Guess what happened.... The property nodes attached themselves to the already existing "Label" property for the XControl itself.  Only by going into XML-editing mode could I undo this effect and rename the short AND long versions of my property node.  While I was intrigued and almost wanted to see how many other properties I could access this way I thought better of it and want to change the behaviour for future generations of LV.  If a user tries to create a property node for an already existing property, please let them know they are doing so.

 

I had briefly, through non-reproducible steps, managed to create a property node for WRITING the "Label" (the inbuild one, not the one I WANTED to create) reference to my XControl.  I refrained from seeing what would happen if I did so.....

 

Shane.

2 Comments
RamK
NI Employee (retired)

Shane,

 

Thanks for reporting this issue.

I agree there should be a warning when user properties conflict with built-in ones. I will create a task to fix it.

 

The conflict arose not because of the name itself, but because of the property identifier (which is typically initialized to the name of the property).

You can change the identifier to something else and retain the name as "Label". To do this:

1. Right-click on the XControl in the project window and select Properties (you may need to unlock the library if the XControl is in use).

2. Select the Item Settings tab.

3. Choose the Property from Contents.

Image5.png

4. Change the Unique Identifier to "Label2' instead.

5. Click OK and save the XControl.

 

Now you should be able to choose either the built-in Label property or the user-defined one.

 

Thanks,

Ram Kudukoli.

 

Intaris
Proven Zealot
Ok. Thanks. I thought I had tried that. Ill check again.