02-12-2009 10:06 AM
Not sure if this has already been asked, but my 'autocomplete' in CVI 9.0 doesn't provide the struct members quick reference box when I put an array of structures inside another structure.
To demonstrate, add this code to the top of any C file in a project:
typedef struct {
int test;
} TEST_STRUCT;
typedef struct {
TEST_STRUCT in_struct_array[5];
} TEST_STRUCT_2;
TEST_STRUCT normal_array[5];
void TestFunc(void){
TEST_STRUCT_2 test_struct;
}
Compile the c file (Ctrl-K). Then inside 'TestFunc', try to autocomplete 'test_struct.in_struct_array[1].' No 'members box' appears. If you leave out the array indexing: 'test_struct.in_struct_array.', then the 'test' member shows up in the 'members box'. It's not an issue with arrays of structures, as 'normal_array[1].' provides the members box. It just doesn't work when you have an array of structures inside another array.
Hopefully that's clear enough for someone to understand and try to reproduce. Is it a setting I have wrong somewhere, or is it a bug/limitation in the IDE?
Solved! Go to Solution.
02-12-2009 12:20 PM
Hi SLocke,
I was able to reproduce the problem you described. It looks as if CVI thinks that the field in the outer struct is the inner struct, instead of an array of inner structs. It doesn't seem to be a new problem, since it also happened in 8.5.
I filed a bug report for this (#145895) and we hope to have a fix for it soon.
Thanks for reporting it!
Luis