September 20, 2021
Auto Completion AddressOf - Prototype Insertion
AddressOf Prototype Insertion (v10.50.065+):
- Show +Proc(parameters) as the first auto completion item.
- Insert prototype when selected.
Select +TimerCallback(...) and type comma.
Which inserts "TimerCallback" and the empty prototype for TimerCallback.
The completed sample script follows:
'#Language "WWB.NET"
Imports System.Threading
Private Sub TimerCallback(ByVal state As Object)
Debug.Print Now
End Sub
Sub Main
Using t As New Timer(AddressOf TimerCallback, Nothing, 250, 500)
For i As Integer = 1 To 5
Wait 1
Debug.Print i
Next
End Using
End Sub
Sample output:
9/20/2021 1:13:53 PM
9/20/2021 1:13:54 PM
1
9/20/2021 1:13:54 PM
9/20/2021 1:13:55 PM
2
9/20/2021 1:13:55 PM
9/20/2021 1:13:56 PM
3
9/20/2021 1:13:57 PM
9/20/2021 1:13:57 PM
4
9/20/2021 1:13:58 PM
9/20/2021 1:13:58 PM
5
Conclusion
Insert the correct prototype for the parameter receiving the AddressOf result.
Avoid needing to look up or remember the prototype's definition.
Copyright Polar Engineering, Inc.