B4J Question FileChooser trouble under Windows7

peacemaker

Expert
Licensed User
Longtime User
Hi, All

A remote user reported that the file pick dialog was stopped to work under Win7.

B4X:
    kvs.Initialize(File.DirData(appname), "kvs")
    SourceFileFolder = kvs.Get("SourceFileFolder")
    If SourceFileFolder = "null" Then
        SourceFileFolder = File.DirApp
    End If


Dim a As FileChooser
    a.Initialize
    a.InitialDirectory = SourceFileFolder
    a.Title = "Choose .XLS:"
    a.setExtensionFilter("Excel file", Array As String("*.xls", "*.xlsx", "*.xlsm"))

    Dim fn As String = a.ShowOpen(MainForm)
    If fn = "" Then Return
    SourceFileFolder = File.GetFileParent(fn)
    fn = File.GetName(fn)

Initially it was working - now no. How to understand it ?
Button click just does not open the file dialog.

He tried another user account - it was working there yesterday, but today - again does not work ! Now in 2 Windows accounts.
 

stevel05

Expert
Licensed User
Longtime User
We need to see a bit more code. For instance Is that code within a try catch block?

If the source folder is invalid, an exception will be raised and the program terminated, unless it is within a try catch block. in which case the result will depend on how you've coded the catch block.
 
Upvote 0

peacemaker

Expert
Licensed User
Longtime User
Actually - no any other codes :).

And problem now is solved ! Issue was with the path that was wrong - the saved folder WAS DELETED , but the code did not check it.
It was discovered by ... installing B4J on the remote PC :p and debugging there via Skype!

But the root question is so...
 
Last edited:
Upvote 0
Top