I've searched the forum but couldn't find how to open a new OS window to a directory. Here's what I've tried:
B4X:
Private Sub btn_OpenFolder_Click
'open the project folder
Log("Opening the project folder: " & current_project_folder)
shell.Initialize("shell","Open",Array(current_project_folder))
shell.WorkingDirectory = current_project_folder
shell.Run(-1)
End Sub
I've also tried "Start" as the Executable string in shell.Initialize.
Sub Button1_Click
Private fx as JFX ' if not already exists in the form...
fx.ShowExternalDocument("C:\")
fx.ShowExternalDocument("E:\B4J")
fx.ShowExternalDocument("E:\ORC\ORC.Delphi\ORCStreamHelper\LSE3Teams")
End Sub
Sub Button1_Click
Private fx as JFX ' if not already exists in the form...
fx.ShowExternalDocument("C:\")
fx.ShowExternalDocument("E:\B4J")
fx.ShowExternalDocument("E:\ORC\ORC.Delphi\ORCStreamHelper\LSE3Teams")
End Sub
I was wondering if fx was usually global or not. Oh! Just found it in Main (in a B4XPages app).
It wasn't in the class module where I put the code, so I added it to the local Sub. Should I instead make a reference to the fx in Main? What's best practice?