I have a boolean value that is changing, apparently, in it's own. I know ... I've spent the last two hours trying to figure this out.
The boolean, located in the custom view module, is named "boolIgnoreDoubleClickToOpen"
This is my custom view module where it is initialized and set:
Now this is the Main module, where I attempt to modify it:
From the log statements, it gets set to True when I call the public class method. However, the next time I test it, it has reverted back to False. The method IgnoreDoubleClickOpen is the only place that it gets set. I've done a Quick Search and also checked line by line, more than once for both.
I've also tested this through Debug Mode and Release Mode (through the IDE & launching the jar on its own).
What would cause the boolean to NOT hold the assigned value, once it passes out of the method that sets it?
The boolean, located in the custom view module, is named "boolIgnoreDoubleClickToOpen"
This is my custom view module where it is initialized and set:
B4X:
Sub Class_Globals
Private fx As JFX
Private EventName As String
Private CallBack As Object
Private mBase As Pane
Private ExplorerWindow As ListView
Private anchorEW As AnchorPane
Private ExplorerDropDown As ComboBox
Private frm As Form
Private dialogue8 As Dialogs8
Private boolIgnoreDoubleClickToOpen As Boolean
Private boolDropbox As Boolean
Private c As ContextMenu
Private JO As JavaObject
Private strCurrentDirectoryURI As String
Private listThisDirectoryDirs As List
Private listThisDirectoryFiles As List
Private listThisDirectoryContents As List
Private DefaultImage As Image
Private mapContextMenus As Map
Private mapClick As Map
Private lvFileExplorer As ListView
End Sub
Public Sub Initialize (vCallback As Object, vEventName As String)
EventName = vEventName
CallBack = vCallback
ExplorerDropDown.Initialize("ExplorerDropDown")
ExplorerWindow.Initialize("ExplorerWindow")
JO.InitializeNewInstance("javafx.beans.property.SimpleObjectProperty",Array(Me))
If File.IsDirectory("C:\Users\User", "Dropbox") = True Then
boolDropbox = True
End If
Log("boolDropbox1: " & boolDropbox)
boolIgnoreDoubleClickToOpen = False <-- Here is where I initially set it.
dialogue8.Initialize
mapClick.initialize
mapClick.Put("LastSelectedIndex", -1)
listThisDirectoryDirs.Initialize
listThisDirectoryFiles.Initialize
listThisDirectoryContents.Initialize
Log("bool3: " & boolIgnoreDoubleClickToOpen)
End Sub
Public Sub IgnoreDoubleClickOpen(boolIgnore As Boolean)
boolIgnoreDoubleClickToOpen = boolIgnore
Log("bool1: " & boolIgnoreDoubleClickToOpen)
End Sub
Now this is the Main module, where I attempt to modify it:
B4X:
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.SetFormStyle("UNIFIED")
MainForm.RootPane.LoadLayout("mainform") 'Load the layout file.
MainForm.Icon = fx.LoadImage(File.DirAssets, "folder_magnify.png")
MainForm.Show
explorer.Initialize(Me, "file_explorer")
intSelectedIndex = -1
mapSelectedURI.Initialize
dialogue8.Initialize
explorer.IgnoreDoubleClickToOpen(True) <---------------------- Changing it here
'CallSubDelayed2(explorer, "IgnoreDoubleClickOpen", True) <--- I've tried it both ways
End Sub
From the log statements, it gets set to True when I call the public class method. However, the next time I test it, it has reverted back to False. The method IgnoreDoubleClickOpen is the only place that it gets set. I've done a Quick Search and also checked line by line, more than once for both.
I've also tested this through Debug Mode and Release Mode (through the IDE & launching the jar on its own).
What would cause the boolean to NOT hold the assigned value, once it passes out of the method that sets it?