Hello Valued Experts,
For years I’ve used a few lines of code to maintain a history list at the bottom of the file menu of the last few files opened. I’m converting a Delphi program to FireMonkey and I’m discovering that the File menu’s InsertObject method causes a “List index out of bounds” error.
This is the line:
Idx1 is 4 and there are 6 items in the File menu, so it wouldn’t seem the Idx1 variable is out of bounds.
If I change the Idx1 value to 1 I don’t get the error, but neither does the newly created menu item show up on the File menu.
Experimenting, I tried using AddObject(Item) and while I don’t get the error, the menu item doesn’t appear at the bottom of the File menu either.
I’m stuck. Any insight would be greatly appreciated.
Thanks in advance.