Sub addSelectionChangedEvent(textarea1 As TextArea,eventName As String)
Dim Obj As Reflector
Obj.Target = textarea1
Obj.AddChangeListener(eventName, "selectionProperty")
End Sub
Sub sourceTextAreaSelection_changed(old As Object, new As Object)
Log(GetType(new))
Dim ta As TextArea
ta=sender
Dim indexString As String
indexString=new
Dim selectionStart,selectionEnd As Int
selectionStart=Regex.Split(",",indexString)(0)
selectionEnd=Regex.Split(",",indexString)(1)
If selectionEnd<>selectionStart Then
Main.sourceTermTextField.Text=ta.Text.SubString2(selectionStart,selectionEnd)
End If
End Sub