Delphi XE 错误

今天在测试Datasnap服务器时,运行如下代码时出现如上错误,事件赋值时,搞了半天无解,最后竟然是窗体创建顺序搞错了,低级错误。

procedure TMainForm.FormCreate(Sender: TObject);
begin
  ReportMemoryLeaksOnShutdown := false;
  ServerContainer1.DSAuthenticationManager1.OnUserAuthenticate:=DSAuthenticationManagerUserAuthenticate;
  ServerContainer1.DSAuthenticationManager1.OnUserAuthorize:=DSAuthenticationManagerUserAuthorize;
  ServerContainer1.DSServer1.OnConnect:=DSServerConnect;
  ServerContainer1.DSServer1.OnDisconnect:=DSServerDisconnect;
  PageControl1.ActivePageIndex:=0;
  ReadConfig;
end;
原文地址:https://www.cnblogs.com/yipin/p/8493266.html