LucaMs Expert Licensed User Longtime User Apr 2, 2014 #1 If you are using Initialize2, then the Clear method does not work. Code: Copy Dim lst As List lst.Initialize2(Array As String("One", "Two", "Three")) 'lst.Initialize 'lst.Add("One") 'lst.Add("Two") 'lst.Add("Three") lst.Clear java.lang.UnsupportedOperationException
If you are using Initialize2, then the Clear method does not work. Code: Copy Dim lst As List lst.Initialize2(Array As String("One", "Two", "Three")) 'lst.Initialize 'lst.Add("One") 'lst.Add("Two") 'lst.Add("Three") lst.Clear java.lang.UnsupportedOperationException
DonManfred Expert Licensed User Longtime User Apr 2, 2014 #2 Does not work says exact NOTHING. Which error you get? Why you want to clear a list which you explicit initialized to HAVE entry´s...
Does not work says exact NOTHING. Which error you get? Why you want to clear a list which you explicit initialized to HAVE entry´s...
eps Expert Licensed User Longtime User Apr 2, 2014 #3 http://www.b4x.com/android/forum/threads/bug-with-list-initialize2.31006/ " Initializes a list with the given values. This method should be used to convert arrays to lists. Note that if you pass a list to this method then both objects will share the same list, and if you pass an array the list will be of a fixed size. Meaning that you cannot later add or remove items. "
http://www.b4x.com/android/forum/threads/bug-with-list-initialize2.31006/ " Initializes a list with the given values. This method should be used to convert arrays to lists. Note that if you pass a list to this method then both objects will share the same list, and if you pass an array the list will be of a fixed size. Meaning that you cannot later add or remove items. "
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #4 DonManfred said: Does not work says exact NOTHING. Which error you get? Why you want to clear a list which you explicit initialized to HAVE entry´s... Click to expand... I wrote the errore message, in red, Speedy I wanted to clean the list to fill it later, after a sort of filtering.
DonManfred said: Does not work says exact NOTHING. Which error you get? Why you want to clear a list which you explicit initialized to HAVE entry´s... Click to expand... I wrote the errore message, in red, Speedy I wanted to clean the list to fill it later, after a sort of filtering.
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #6 eps said: http://www.b4x.com/android/forum/threads/bug-with-list-initialize2.31006/ " Initializes a list with the given values. This method should be used to convert arrays to lists. Note that if you pass a list to this method then both objects will share the same list, and if you pass an array the list will be of a fixed size. Meaning that you cannot later add or remove items. " Click to expand... I was trying to pass list as a parameter to a function and change the content of it, inside the function. But no matter, I initialize it with the normal method
eps said: http://www.b4x.com/android/forum/threads/bug-with-list-initialize2.31006/ " Initializes a list with the given values. This method should be used to convert arrays to lists. Note that if you pass a list to this method then both objects will share the same list, and if you pass an array the list will be of a fixed size. Meaning that you cannot later add or remove items. " Click to expand... I was trying to pass list as a parameter to a function and change the content of it, inside the function. But no matter, I initialize it with the normal method
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #7 DonManfred said: RTFM, @LucaMs Click to expand... SURE! ((if I knew the meaning of RTFM )
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #9 DonManfred said: Read The Fucking Manual Click to expand... LOL I have read all the manuals. My memory betrays me! (but in this case things are different)
DonManfred said: Read The Fucking Manual Click to expand... LOL I have read all the manuals. My memory betrays me! (but in this case things are different)
DonManfred Expert Licensed User Longtime User Apr 2, 2014 #10 LucaMs said: I have read all the manuals. Click to expand... Not me
LucaMs Expert Licensed User Longtime User Apr 2, 2014 #11 Same for RemoveAt, if the list is filled using: File.ListFiles
DonManfred Expert Licensed User Longtime User Apr 2, 2014 #12 LucaMs said: My memory betrays me! Click to expand... ;-)