the issue I encounter is more in my head but I don’t get it right.
I have an Array of dictionaries which I populate.
Later on I want to populate a popupMenu and I tried this:
> for each position as Dictionary in app.allPositions > pm_paymentName.AddRow(position.Value("paymentName")) > next
The result is that the popupMenu is populated with the same value (last value of the dictionarry in the array).
Of course I am missing a “new” to get a fresh dictionary each time but I can’f figure out where to put it.
for each position as new Dictionary in app.allPositions pm_paymentName.AddRow(position.Value("paymentName")) next
Throws a Syntax Error.
Where am I wrong?
Thanks in advance!