示例代码:
定义SESSION×××××××××××××××××××××××××
TUserSession = class(TComponent)
public
mpObj:CMapXLayer;
constructor Create(AOwner: TComponent); override;
end;
赋值×××××××××××××××××××××××××××××××××××××
var map1:TMap;
procedure TIWForm1.IWButton1Click(Sender: TObject);
begin
map1:=TMap.Create(nil);
map1.Layers.Add('USA',1);
UserSession.mpObj:=map1;
end;
调用※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※
procedure TIWForm1.IWButton2Click(Sender: TObject);
begin
webapplication.ShowMessage(UserSession.mpObj.title);
end;
这个时候就提示错误:对象没有连接到服务器……