I have a class module that needs to add an event handler fro a textfield that is passed-in as a paramter
when the class is initialised.
I place a breakpoint in the sub TextField1_KeyPressed,but execution does not reach this sub
any ideas why is that so ?
and where can I find documentation about different kinds of events that I can catch for different type of nodes ?
Sub Class_Globals
Private fx As JFX
End Sub
Public Sub Initialize(tf As TextField)
Dim r As Reflector
r.Target = tf
r.AddEventHandler ("TextField1_KeyPressed", "javafx.scene.input.KeyEvent.KEY_PRESSED")
dim joTXT as javaobject = txt
Dim event As Object = joTXT.CreateEventFromUI("javafx.event.EventHandler","keypressed", Null)
joTXT.RunMethod("setOnKeyPressed", Array(event))
private Sub keypressed_Event (MethodName As String, Args() As Object) As Object
CallSubDelayed2("yourModule","YourEventName" & "_keypressed",args(1))
End Sub