Thanks for the tip, but even using this minimal project code, the sub RPScroll never runs
The only change with respect to the indicated code is the line 19 that initializes the Canvas1 object since the compilation did not happen without it
And the addition of the jReflection 1.20 library
I am using B4J 9.50 (64bit), Jdk 11.0.1, on Win10 64bit
What is missing from the project to 'see' the mouse wheel?
#Region Project Attributes
#MainFormWidth: 600
#MainFormHeight: 600
#End Region
Sub Process_Globals
Private fx As JFX
Private MainForm As Form
Private Canvas1 As Canvas
Private xui As XUI
End Sub
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.Show
Dim PagesManager As B4XPagesManager
PagesManager.Initialize(MainForm)
Canvas1.Initialize("evnCanvas")
Dim R As Reflector
R.Target = Canvas1
R.AddEventFilter("RPScroll","javafx.scene.input.ScrollEvent.SCROLL")
End Sub
Private Sub RPScroll_Filter (E As Event)
Dim MouseEvent As JavaObject = E
Log(MouseEvent.RunMethod("getDeltaY",Null))
End Sub
'Template version: B4J-1.0
#Region Delegates
Sub MainForm_FocusChanged (HasFocus As Boolean)
B4XPages.Delegate.MainForm_FocusChanged(HasFocus)
End Sub
Sub MainForm_Resize (Width As Double, Height As Double)
B4XPages.Delegate.MainForm_Resize(Width, Height)
End Sub
Sub MainForm_Closed
B4XPages.Delegate.MainForm_Closed
End Sub
Sub MainForm_CloseRequest (EventData As Event)
B4XPages.Delegate.MainForm_CloseRequest(EventData)
End Sub
Public Sub MainForm_IconifiedChanged (Iconified As Boolean)
B4XPages.Delegate.MainForm_IconifiedChanged(Iconified)
End Sub
#End Region
#Region Shared Files
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
#End Region
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
Sub Class_Globals
Private Root As B4XView
Private xui As XUI
End Sub
Public Sub Initialize
' B4XPages.GetManager.LogEvents = True
End Sub
'This event will be called once, before the page becomes visible.
Private Sub B4XPage_Created (Root1 As B4XView)
Root = Root1
Root.LoadLayout("MainPage")
End Sub
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
Private Sub Button1_Click
xui.MsgboxAsync("Hello world!", "B4X")
End Sub
I tried to attach the project file but I don't see anything in the post
Besides pressing ATTACH key and selecting the file to send, is there anything else to do?