TIWAJAXNotifier 所在单元及继承链: IWCompExtCtrls.TIWAJAXNotifier < TIWBaseHTML40Component < TIWBaseHTMLComponent < TIWBaseComponent < TComponent < TPersistent < TObject 主要成员:
property SendNotification: Booleanproperty OnNotify: TNotifyEventprocedure Notify
测试(需要 1 个 IWButton、4 个 IWLabel、3 个 IWAJAXNotifier):
{确保这是异步事件}procedure TIWForm1.IWButton1AsyncClick(Sender: TObject; EventParams: TStringList);begin IWLabel1.Caption := TimeToStr(Time); IWAJAXNotifier1.Notify; //OnAsyncClick 执行到最后, 让 IWAJAXNotifier1 发出通知end;{IWAJAXNotifier1.OnNotify}procedure TIWForm1.IWAJAXNotifier1Notify(Sender: TObject);begin Sleep(1000); IWLabel2.Caption := TimeToStr(Time); IWAJAXNotifier2.Notify; //继续让 IWAJAXNotifier2 发出通知end;{IWAJAXNotifier2.OnNotify}procedure TIWForm1.IWAJAXNotifier2Notify(Sender: TObject);begin Sleep(1000); IWLabel3.Caption := TimeToStr(Time); IWAJAXNotifier3.Notify; //继续让 IWAJAXNotifier3 发出通知end;{IWAJAXNotifier3.OnNotify}procedure TIWForm1.IWAJAXNotifier3Notify(Sender: TObject);begin Sleep(1000); IWLabel4.Caption := TimeToStr(Time);end;