Hallo
I use this code to save and open files. how can i sort the data so they came out at the list in same order that they where saved?
Code
Dim btmp As Bitmap
Dim Id As InputDialog
Dim ct1 As CustomToast
btmp.Initialize(File.DirAssets,"android48.png")
ct1.Initialize
'Id.PasswordMode = True
'Id.InputType =Id.INPUT_TYPE_DECIMAL_NUMBERS
'Id.InputType = Id.INPUT_TYPE_NUMBERS
'Id.InputType = Id.INPUT_TYPE_PHONE
Id.InputType = Id.INPUT_TYPE_text
Id.Input = ""
Id.Hint = "Skriv inn filnamnet!"
Id.HintColor = Colors.ARGB(196, 255, 140, 0)
ret = DialogResponse.CANCEL
ret = Id.Show("Skriv inn filnamnet", "Pulsdialog", "Ok", "Angre", "", bmp)
If ret = -1 Then
lagre = Id.Input
Dim Map1 As Map
Map1.Initialize
For i = 1 To 7
Map1.Put("Makspuls" &"", Round( svar1) & "")
Map1.Put("Bmi" &"",Round(bmi) & "")
Map1.Put("Fitnes kat" &"", EditText11ukk.Text& "")
Map1.Put("Pulsone lett" &"", Round(lett1)& " " & Round(lett2) &"")
Map1.Put("Pulsone At" &"", Round(at1)& " " & Round(at2) &"")
Map1.Put("Pulsone Vo2max" &"", Round(vo1)& " " & Round(vo2) &"")
Map1.Put("Fitnes id" &"",Round(svar)& "")
Next
File.WriteMap(File.DirRootExternal & "/pulsdata", lagre & ".txt", Map1)
ct1.ShowBitmap(" Filen er lagra som " & lagre & ".txt",2000,Gravity.top,20,20,btmp)
End If
End Sub
I use this code to save and open files. how can i sort the data so they came out at the list in same order that they where saved?
Code
Dim btmp As Bitmap
Dim Id As InputDialog
Dim ct1 As CustomToast
btmp.Initialize(File.DirAssets,"android48.png")
ct1.Initialize
'Id.PasswordMode = True
'Id.InputType =Id.INPUT_TYPE_DECIMAL_NUMBERS
'Id.InputType = Id.INPUT_TYPE_NUMBERS
'Id.InputType = Id.INPUT_TYPE_PHONE
Id.InputType = Id.INPUT_TYPE_text
Id.Input = ""
Id.Hint = "Skriv inn filnamnet!"
Id.HintColor = Colors.ARGB(196, 255, 140, 0)
ret = DialogResponse.CANCEL
ret = Id.Show("Skriv inn filnamnet", "Pulsdialog", "Ok", "Angre", "", bmp)
If ret = -1 Then
lagre = Id.Input
Dim Map1 As Map
Map1.Initialize
For i = 1 To 7
Map1.Put("Makspuls" &"", Round( svar1) & "")
Map1.Put("Bmi" &"",Round(bmi) & "")
Map1.Put("Fitnes kat" &"", EditText11ukk.Text& "")
Map1.Put("Pulsone lett" &"", Round(lett1)& " " & Round(lett2) &"")
Map1.Put("Pulsone At" &"", Round(at1)& " " & Round(at2) &"")
Map1.Put("Pulsone Vo2max" &"", Round(vo1)& " " & Round(vo2) &"")
Map1.Put("Fitnes id" &"",Round(svar)& "")
Next
File.WriteMap(File.DirRootExternal & "/pulsdata", lagre & ".txt", Map1)
ct1.ShowBitmap(" Filen er lagra som " & lagre & ".txt",2000,Gravity.top,20,20,btmp)
End If
End Sub