B4A Question Copy Listview (AddTwoLinesAndBitmap2) item to another Listview - emexes (first post)    Dec 28, 2022   (1 reaction) What I get is that List2 = List1 means that List1 and List2 are then both the same (shared, one, single) List.
And List1.Sort(True) is sorting that one (shared) List.
Thus magically sorting List2 also, ie rearranging the items in List2 but without making the corresponding rearrangements of List3 a B4i Library [B4X] [XUI] iSD_TreeList - Star-Dust    Apr 02, 2024   (9 reactions) ListOfIDBraches (IDBranche As String) As List Returns a list of strings This list contains the IDs of the sub-branches attached To a branch ListOfIDLeafs (IDBranche As String) As List Returns a list of strings This list contains the IDs of the leaves attached To a branch MoveLeaf (IDLeaf As String, B4A Question How to identify duplicate elements in a list, from code - johnmie (first post)    Jun 05, 2023   (2 reactions) As unsophisticated hobby programmer I simply use
List1.sort(true)
for i = list1.size-1 to 1 step -1
if list1.get(i) = list1.get(i-1) then
list1.remove(i)
next B4A Tutorial [B4X] Sophisticated sorting with B4XComparatorSort - Erel    Mar 08, 2022   (20 reactions) This allows us to sort lists using all kinds of sophisticated ordering.
Attached is an example of sorting "person" records. The fields are:
Type Person (Name As String, Age As Int, Status As String)
We want to first list the employees, sorted by their names and then sorted by their ages.
Public B4J Question Custom type list sorting with multiple criteria - Erel (first post)    Aug 12, 2021   (4 reactions) You can sort by multiple fields by sorting the list multiple times, starting with the inner field and going up.
Example:
Type Test(FieldA As Int, FieldB As Int, FieldC As Int)
Dim List As List
List.Initialize
For i = 1 To 100
List.Add(CreateTest(Rnd(1, 5), Rnd(1, 5), Rnd(1, 5)))
Next
List.Sor B4J Code Snippet Sort and Search Lists in Any Arbitrary Way - Heuristx    Aug 18, 2022   (2 reactions) Call it DelegatedCode, for example. The ListSort function needs these parameters: the list to sort, a "context" to use with(= the object that has the function AComparer), and the function that compares two items. Then sort the list: Public Sub ListSort(lst As List, AContext As Object, AComparer As B4A Question For Each with Arrays - agraham (first post)    Sep 25, 2020   (2 reactions) Sorting Lists of user defined types using List.SortType is extremely useful on occasion and can simplify a program's data structures significantly, B4A Question Sort a List of Type with multiple criterias [SOLVED] - Erel (first post)    Jun 28, 2020   (1 reaction) You can create an additional field just for sorting and add the three strings to that field. B4A Question [SOLVED] Lists and sorting them! - drgottjr (first post)    May 26, 2020   (1 reaction) if you are talking about sorting a list in some pre-determined order, there is such a method in the list object. it uses a sort field. if you're talking about swapping 4 items in a list of 100 items, then a swap sub could handle it. unclear how you make the choices "at will" and how many choices Bug? List.Sort by iOS 18 - Filippo    Sep 18, 2024 Hi,
when using the “lst.sort” function, all my apps from iOS 18 onwards crashed.
Here is my code:
Private Sub goShowSavedLaps
Dim lst As List
Dim strTmp As String
lst.Initialize
'Eine Liste mit alle Dokumenten erstellen
lst = File.ListFiles(File.DirDocuments)
If lst.S Page: 1   2   3   4   5   6   7   Powered by ColBERT |