Specific Questions on Whenever & how to implement
Using TP Version 6.0.0 Build 462.
OK I'm having this problem with the Whenever - I can't seem to implement it correctly.
If I record and play back such as in the following example - it works.
<font class="small">Code:</font><hr /><pre>
Function Main() As Boolean
DotNETForm("Resource 42 DotNETForm").Attach
DotNETForm("New Warehouse Item DotNETForm").Attach
Public Sub Script_Whenever(ByVal TheEvent As TPEvents.TEventGroup)
If TheEvent.Name = "AssertErrorWindowExists" Then
ElseIf TheEvent.Name = "AssertWindowExists" Then
ElseIf TheEvent.Name = "PreAssertWindowExists" Then
If the Sub Script_Whenever is put in with the module that contains Main - it works - but when I move it to a Module of common functions it does not work.
Also if I move the Whenever xyz to the top of Main() it won't work.
At the same time, I have some common functions (in a Common Module) that I would like to put the whenever statements in, but when I try the "Insert -> Event -> Window" from the menu, they never get added. (probably because of #2).
Any help in this matter would be greatly appreciated.