I used structured arrays a lot! No I mean A LOT!
In fact, I generally have a class called FixedLookups that contains several Hardcoded Structured Arrays for things that are necessarily user configurable, but still easier for me to code a combo box using a structured array instead of hardcoding into control properties via the IDE.
That Class has a common Structure:
And then a number of arrays declared based on that structure, like this:
Then in the Constructor for the class I have code like this to populate the array.
Well it recently occurred to be, that WX allows you to specify an entire Array as one parameter using a “special” short hand code, by surrounding it with .
So now those 8 lines of code, get replaced by 2 lines of code.
Much cleaner and easier to read. Obviously I wouldn’t use this for a complex array with a lot of fields, but very handy for this simple 2 field array.
Now, back to your regular schedule program….