IntraWeb Archive

IntraWeb XII changes

IntraWeb XII changes

This document shows all IntraWeb changes that may affect your application.

Note: this document is always been updated

Unit names

Some IntraWeb units have their names changed. You basically needs to remove the old unit name and the IDE will update your sources (except for those you added manually)

  • IWExtCtrls is now IWCompExtCtrls
  • IWGrids is now IWCompGrids
  • IWTreeView is now IWCompTreeView
  • IWJQueryWidget is now IWCompJQueryWidget
  • IWProgressIndicator is now IWCompProgressIndicator
  • IWSilverlight is now IWCompSilverlight
  • IWAuther is now IWAutherBase (starting from release 12.1.27)

Components

  • TIWFile has moved from unit IWCompEdit to the new IWCompFile

ServerController Events

Before/AfterDispatch

Old form

procedure TIWServerController.IWServerControllerBaseBeforeDispatch(Sender: TObject; Request: TWebRequest; Response: TWebResponse;  var Handled: Boolean);
var
  s:string;
  agent: string;
begin
  s := Request.PathInfo;
  agent := Request.UserAgent;

  if (pos(‘$/start’,s) > 0) or (s = ‘/’) then
  begin
    if (pos(‘iPad’, agent) > 0) then
    begin
      Response.SendRedirect(‘/ipad/’);
      Handled := true;
    end;
    if (pos(‘iPhone’, agent) > 0) or (pos(‘iPod’, agent) > 0) then
    begin
      Response.SendRedirect(‘/iphone/’);
      handled := true;
    end;
  end;
end;

The Request param is now of type THttpRequest (unit IW.HttpRequest) and the Response param has been replaced with the new aReply param (THttpReply, unit IW.HttpReply).

New form

procedure TIWServerController.IWServerControllerBaseBeforeDispatch(Request: THttpRequest; aReply: THttpReply);
var
  s:string;
  agent: string;
begin
  s := request.PathInfo;
  agent := Request.UserAgent;
  if (pos(‘$/start’,s) > 0) or (s = ‘/’) then
  begin
    if (pos(‘iPad’, agent) > 0) then
    begin
      aReply.SendRedirect(‘/ipad/’);
    end;
    if (pos(‘iPhone’, agent) > 0) or (pos(‘iPod’, agent) > 0) then
    begin
      aReply.SendRedirect(‘/iphone/’);
    end;
  end;
end;

OnBrowserCheck, Browser types

See this post

IWServer.AddInternlFiles

This method has been moved to the unit IWServerInternalFiles. From now, you can simply use use gInternalFiles.Add(‘???’, ‘???’)