I have a strange bug when populating a popupmenu via the constructor of a container.
I have a button that create a container (stored as a property) and embed it in the right side of a window.
In the constructor of this container, I call some init (default name I gave them) methods to load controls.
When adding rows to the popupmenu, I use AddRow method and right after it, use LastAddedRowIndex to set the RowTag (via RowTagAt) of the last added row.
The issue is that LastAddedRowIndex always returns -1 in this case but the rows are added.
If I call the init of the container with an other button (and not within the constructor), LastAddedRowIndex returns the right values.
Maybe I do not get something but I created a workaround. I can easily use a workaround to make it works but I do not know if it’s a bug or not.
Here the link for feedback with the small project included.
OS X 10.14.6