B4A Question Clear list, unexpected result? [Solved] - PaulMeuris (first post)    May 07, 2022   (2 reactions) If you write:
listB.AddAll(listA)
The contents of listA is added to the contents of listB.
The clear method removes all the items from the list (listB)
So now listA remains the same! B4A Question auto declare inline variable/object - ilan (first post)    Oct 19, 2021 newlist.As(List).AddAll(l)
this snippet should return already a declared list named newlist with all items added from list "l"
ITS A WISH!! Bug? List.Sort by iOS 18 - Erel (first post)    Sep 18, 2024   (5 reactions) This works: Dim lst As List lst.Initialize lst.AddAll(File.ListFiles(File.DirDocuments)) lst.Sort(True) Log(lst) B4A Question [Solved] Job.GetString to List - drgottjr (first post)    Aug 30, 2024   (2 reactions) i don't fully agree with the selections on the list, but i would use regex.split() and list.addall(). i'm guessing the string uses crlf (or possibly "\r\n", depending). so split the string on crlf to get an array of strings and then create a list and call addall. dim result as string = job.getstrin B4J Question Weird List Add problem - Erel (first post)    Nov 25, 2020   (1 reaction) File.ListFiles returns a read-only list (see the help box).
AddAll will indeed work:
Dim List1 As List
List1.Initialize
List1.AddAll(File.ListFiles(...)) B4A Question Choose a random between 4 strings - Erel (first post)    Apr 19, 2021   (2 reactions) Quiz:
What is the difference between:
Dim MyList As List
MyList.Initialize
MyList.AddAll(Array ("no", "yes","ooo","test","yyy","nnn"))
And:
Dim MyList As List = Array ("no", "yes","ooo","test","yyy","nnn")
? B4A Question How to implement huge lookup table - Peter Simpson (first post)    May 28, 2015   (2 reactions) Here you go @Arf. Below is an example of a list. I would read your values from a database if possible though. 'Example Dim Listy As List Listy.Initialize Listy.AddAll(Regex.Split(", ", "3.0, 1.3876, -0.0221, -0.0832, 3.25, 1.2621, -0.0191, -0.0616, 3.5, 1.1460, -0.0167, -0.0420" B4J Question Elements in multi-dimensional lists - EnriqueGonzalez (first post)    May 01, 2016   (2 reactions) You are welcome.
AND there is an even more "simpler" but not so practical way. if the number of list is known you can create something like this:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
'MainForm.RootPane.LoadLayout("Layout1") 'Load the la Italian help su algoritmo random - ivanomonti (first post)    Mar 29, 2022 vedi se ti piace
private Sub sRandomAzzardoMilitare
Dim lst As List
lst.AddAll(Array As String("bingo","bongo","bango","bunga","bunga","figa"))
Log(lst.Get(Rnd(0,lst.Size-1)))
End Sub B4A Code Snippet Password generator Sub - Erel (first post)    Mar 11, 2018   (6 reactions) ","*","+","-",";","_")
Dim charList As List
charList.Initialize
If numbers Then charList.AddAll(numbersArray)
If lowercase Then charList.AddAll(lowercaseArray)
If uppercase Then charList.AddAll(uppercaseArray)
If symbols Then charList.AddAll(symbolsArray)
Dim newP Page: 1   2   3   4   5   6   7   Powered by ColBERT |