B4J Question File chooser multiple files

tremara1

Active Member
Licensed User
Longtime User
I am trying to select multiple files in a file chooser and put the paths in a list using....
B4X:
myList.AddAll(fc.ShowOpenMultiple(MainForm))
it works fine if you select at least one file but if you cancel select it crashes. How can I load the paths in the list and deal with user cancels select??
Sorry if I have missed the obvious(again).....
 

tremara1

Active Member
Licensed User
Longtime User
See the documentation: "Returns an uninitialized list if the user has not chosen any file."
B4X:
Dim files As List = fc.ShowOpenMultiple(...)
If files.IsInitialized Then
myList.AddAll(files)
End If
thanks mate....
 
Upvote 0
Top