Erik,
the problem lies in that the EasyTab instrument chains its own callback to the callback of all the controls in the panels. If you call your Init() function AFTER having loaded the panels in the EasyTab control, the chain of callbacks is broken, and somewhere in the instrument you get this type of error.
The solution is simple:
1. Load the panels
2. Duplicate controls (implicitly adding callbacks to them)
3. Add panels to the EasyTab control
I modified your code this way and now it runs:
//EasyTab_LoadPanels (panel, tabCtrl, 1, "simpdemo.uir", __CVIUserHInst, CONTROL, &panelArray[0],
// VALVES, &panelArray[1], MONITOR, &panelArray[2], CONFIG, &panelArray[3], HELP, &panelArray[4], 0);
panelArray[0] = LoadPanel(panel, "simpdemo
.uir", CONTROL);
panelArray[1] = LoadPanel(panel, "simpdemo.uir", VALVES);
panelArray[2] = LoadPanel(panel, "simpdemo.uir", MONITOR);
panelArray[3] = LoadPanel(panel, "simpdemo.uir", CONFIG);
panelArray[4] = LoadPanel(panel, "simpdemo.uir", HELP);
Init();
EasyTab_AddPanels (panel, tabCtrl, 1, panelArray[0], panelArray[1], panelArray[2],
panelArray[3], panelArray[4], 0);
This is problably the same problem you hava in the other project you are working to.
One more little hint: I moved the declarations of panel and tabCtrl into the main() function. As per panel variable, since 'panel' is the default name of an argument of all control callbacks, I tend to avoid problems that arise in having a global and a local variable of the same name (besides all, you don't need a global variable for the main panel handle, since it is passed to all control's callbacks). A global tabCtrl variable is not necessary for the project to work, so I moved into main() fu
nction too (unless I do need variables to be global, I personally prefere to have them local to functions in which are used).
Hope this helps
Roberto