03-18-2013 01:00 PM
...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
Solved! Go to Solution.
03-18-2013 01:33 PM
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?
03-19-2013 09:35 AM
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.
03-19-2013 09:42 AM
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.