Implementing a delegate

The following code is from dot net which I want to use in xojo, how do I go about implementing a delegate, so that I can update a textarea on the fly. The textarea is in a dialog box and I run batch process using a method from the dialog.

Private Sub setText()
Try

            setPdfText("File " & e.Name & _
                                     " has been created" & vbCrLf)

    Catch ex As Exception
        Logger.Log(ex.ToString())
    End Try

End Sub

Private Delegate Sub setPdfTextDelegate(s As String)

Private Sub setPdfText(ByVal s As String)
    Try
        tbFW_Info.Focus()
        If tbFW_Info.InvokeRequired Then
            tbFW_Info.Invoke(New setPdfTextDelegate(AddressOf setPdfText), s)
        Else
            tbFW_Info.AppendText(s)
        End If
    Catch ex As Exception
        Logger.Log(ex.ToString())
    End Try

End Sub

So instead of having the courtesy to even acknowledge the posts trying to help you for the very same topic in https://forum.xojo.com/35184-updating-textarea-on-the-fly you are now trying something else. If you discourage attempts to assist, you’re going nowhere fast.

Hi Michael

I did try everything suggested in 35185 and nothing worked and as there was no examples to encourage me any further, I thought it would be appropriate to explain in detail what I was trying to achieve.

Thank you for your suggestions.