M morteza2006 New Member Apr 23, 2020 #1 Hello friends Please tell me why line 7 of the following code gives an error message B4X: Sub getcontacts As String Dim allc As String Dim list1 As List list1.Initialize list1 = contacts.GetAll For Each i As Contact In list1 allc = i.GetPhones Next Return allc End Sub
Hello friends Please tell me why line 7 of the following code gives an error message B4X: Sub getcontacts As String Dim allc As String Dim list1 As List list1.Initialize list1 = contacts.GetAll For Each i As Contact In list1 allc = i.GetPhones Next Return allc End Sub
Erel B4X founder Staff member Licensed User Longtime User Apr 23, 2020 #2 1. Check code smell #1: https://www.b4x.com/android/forum/threads/b4x-code-smells-common-mistakes-and-other-tips.116651/ 2. You should use ContactUtils. 3. Contact.GetPhones doesn't return a string. It returns a Map. Upvote 0
1. Check code smell #1: https://www.b4x.com/android/forum/threads/b4x-code-smells-common-mistakes-and-other-tips.116651/ 2. You should use ContactUtils. 3. Contact.GetPhones doesn't return a string. It returns a Map.