04-25-2006 02:19 PM
Wow scomack, I think you are on to something... In debug mode, the values of my panel handles (I have three panels) are -1, 2, and 3 for panel1, panel2, and panel3, respectively. But it looks as if whenever panel1 is referenced the value is somehow converted to 1... I tried using (panel1 < 0) to verify that panel1 is indeed negative, but it wasn't caught. Strange. The other two panels load just fine. So what does "The Interface Manager could not be opened." mean?
-JR
04-25-2006 02:24 PM
JR,
Panel 1, when you originally load it, if it is -1, that means that the panel isn't getting loaded. Perhaps the panel is in a different UIR file?
04-25-2006 02:26 PM
04-25-2006 02:46 PM
JR,
You souldn't be able to see the panel when you run and compile the program if, on load the panel returns a -1 for a value. Calling DisplayPanel(-1) will return an error, and no panel will be loaded. Do you display all three panels, Panel1, Panel2, Panel3 and see each individual panel when you run? If this is so then somewhere after you have called LoadPanel and DisplayPanel with Panel1 that value gets set to -1. In fact, I think that this is what is happending, because typically the panel numbering goes up from 1, and the values you had for panel2 and panel3 were 2 and 3. That means somewhere another valid panel was probably loaded (which would be panel1) and then somehwere in the code it got set to -1. Perhaps a conditional statement with a single = instead of two == is doing this? You can check for this by setting 'Detect assignments in conditional expressions' under options->build options in the CVI compiler.
04-25-2006 03:26 PM
Thanks for all your guys' help! I've solved my problem... although I am still not quite sure what the problem was. Here's the rundown... I had two ways of acquiring user input:
GetUserEvent(FALSE,&panel1,&ctrl);
switch(ctrl)
...
and the callback functions
It seems as if these two methods were interfering with each other. I opted to remove the cumbersome switch method and go full-fledged with the callback functions. A little rewriting and addition of a RunUserInterface() call into main() and presto... no more problems! Anyone have any ideas of what was going on here? I know it sounds kinda weird and hard to follow... oh well. Thanks again for the great support! 😄
-JR
04-25-2006 03:53 PM
04-25-2006 03:56 PM
Neat, thanks for the clarification Dave! Hope other people will find this thread useful. One last thing, how do I remove this topic from appearing at the top of the list on the main page?
-JR