while trying to use the designer generated header files with multiple projects in my application i came accross a little design flaw.
The issue is multiple definitions.
the .h files that designer generates contain no precompiler commands to check if the file’s already been included or not. You could get around this by using naming conventions in your designer files but you will still get stuck on one definition: the master category. You cannot change it in the designer yet it must be in every .h file that designer generates.
All i’m saying is that the way the file is generated should at least include
and for constant IDS like the master category
const int EVENTCATEGORY_MASTER = 0;
const int EVENTCATEGORY_MASTER_MUSIC = 0;
or some other clever way of achieving the same result.
- micken asked 10 years ago
I think another cool feature for these header files would be to declare a constant int containing the number of events in total, the number of events in each group, and the number of events in each category.
I figure since this can’t really change at runtime it would be more useful to have these numbers here than get them using getNumEvents, but the main purpose for this is so that the programmer can create arrays based on the size of groups/categories/total. I myself would like this specifically for making arrays of indexes. or is there a simpler way of doing this?
- micken answered 10 years ago
[quote="micken":1l0672z2]I think another cool feature for these header files would be to declare a constant int containing the number of events in total, the number of events in each group, and the number of events in each category.
This does sound like it could be useful. We will discuss this internally and get back to you.
Generated header files now have include guards and event count constants.
Additionally, to prevent naming collisions all constant names now have the project name inserted into them (e.g. for a project called "test", EVENTGROUP_EXAMPLES has become EVENTGROUP_TEST_EXAMPLES, etc.).
These changes will be in the next released version.
Please login first to submit.