Xojo.Core.Timer.CallLater

Hello Forum,

In a web project, I have a web page with a public method called SaveProposal which I call from a button. The SaveProposal method updates some db tables etc.

I use the MouseDown event to update the user interface:

lblPleaseWait.Visible = True // displays label "Please wait"
pwSaveProposal.Visible = True // displays progress wheel
btnSaveProposal.Enabled = False // disable the button 

…I use the Action event to call the Method (and the final few lines of the method reset the user interface)

SaveProposal

Works fine, the method takes between 4-6 seconds to execute.

However, if I wish to implement this in a single step using a timer (i.e. delete the MouseDown event and replace the Action event with):

lblPleaseWait.Visible = True // displays label "Please wait"
pwSaveProposal.Visible = True // displays progress wheel
btnSaveProposal.Enabled = False // disable the button
Xojo.Core.Timer.CallLater(2000, AddressOf SaveProposal)

…the SaveProposal method does not fire.

I believe the SavePropsal method is in scope as I can call it directly (as per my usual method). Also if I create a test web project and test similar logic the event called by the timer does fire.

Any troubleshooting suggestions?