Hi
I am a little baffled, please advise
This is my map, using numbers and text
I then call this method in my "select" component
The end result is incorrect. I was using "for each" clause and decided to check with indexes instead.
This is the console log output...
How do I make this to start at "01" and not "10"
I am a little baffled, please advise
This is my map, using numbers and text
B4X:
Sub InitMonths
Months.Initialize
Months.Put("01", "January")
Months.Put("02", "February")
Months.Put("03", "March")
Months.Put("04", "April")
Months.Put("05", "May")
Months.Put("06", "June")
Months.Put("07", "July")
Months.Put("08", "August")
Months.Put("09", "September")
Months.Put("10", "October")
Months.Put("11", "November")
Months.Put("12", "December")
End Sub
I then call this method in my "select" component
B4X:
Sub SetMonths
Clear
Dim Months As Map = SDUIShared.Months
Dim mTot As Int = Months.Size - 1
Dim mCnt As Int = 0
For mCnt = 0 To mTot
Dim mkey As String = Months.GetKeyAt(mCnt)
Dim mval As String = Months.GetValueAt(mCnt)
Log(mkey)
Log(mval)
AddItem(mkey, mval)
Next
End Sub
The end result is incorrect. I was using "for each" clause and decided to check with indexes instead.
This is the console log output...
How do I make this to start at "01" and not "10"