LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI deleting a CB prototype...

Solved!
Go to solution

...whenever I update my .uir file. The prototype in question is for a callback, but not for a UI element (I suspect this is the reason it's getting deleted). It's a callback for the ConnectToTCPServer() function.

 

Can anyone shed any light on this?

 

Thanks.

 

mz

0 Kudos
Message 1 of 4
(2,890 Views)
Solution
Accepted by topic author mzimmers

Oh, I see now...evidently when you create a .uir file, the corresponding .h file is regenerated. I guess I should rename my .uir file (and the .h file) to not be the same as my .c file?

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

Hey mzimmers,

 

What method are you using to update the uir file? I created a UIR, generated the code for that UIR, added some code to the .c file, and then changed something in the UIR and tried generating code again. When I chose the "All Callbacks" option on the code generation menu, it asked me if I wanted to overwrite existing methods one-by-one, and did not delete any of the code in my .c file. However, when I chose the "All Code" option on the menu, it asked if I wanted to overwrite the .c file, and when I said Yes, it completely replaced my .c file with the blank one. Is this what you're seeing?

 

If you do make changes to the UIR (such as adding a control), you can always use the Generate Callbacks option on the code generation menu to add those callbacks, or even right-click on a control directly and generate its callback code.

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

At the time, I was just saving the .uir file...that automatically updated the .h file. I'm kind of following my nose through all this stuff, and didn't realize at the time the .h file was generated by CVI. So...now, I leave it alone like the warning in the header says to do.

 

I've moved code into other files so I don't have to touch this one any more.

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