D dougc Member Licensed User Longtime User Feb 28, 2013 #1 hey everyone, I am trying to log an array string but doing B4X: Log("array = " & frameArray) I get array = [Ljava.lang.String;@4209a2d8 Click to expand... I can loop through the array but I am hoping there is abetter way to log the entire array (its an array of string) thanks dougc
hey everyone, I am trying to log an array string but doing B4X: Log("array = " & frameArray) I get array = [Ljava.lang.String;@4209a2d8 Click to expand... I can loop through the array but I am hoping there is abetter way to log the entire array (its an array of string) thanks dougc
Erel B4X founder Staff member Licensed User Longtime User Feb 28, 2013 #2 You can create a method that wraps the array as a list: B4X: Sub WrapArray(arr() As String) As List Dim l1 As List l1.Initialize2(arr) 'This only wraps the array. It doesn't copy it. Return l1 End Sub Log("array = " & WrapArray(frameArray)) Upvote 0
You can create a method that wraps the array as a list: B4X: Sub WrapArray(arr() As String) As List Dim l1 As List l1.Initialize2(arr) 'This only wraps the array. It doesn't copy it. Return l1 End Sub Log("array = " & WrapArray(frameArray))