![]() |
Please also review Tools|Environment Options|Library "Library Path" inside Delphi after installing, to make sure that it does not include any paths containing older versions of the components.
Changes to WebHub Components
If you do not refresh ALL webactions, they will not be known to the system and therefore will not be able to be called from W-HTML. In other words, they will not work.
The reason for this requirement is to speed up recognition of webaction components when W-HTML is interpreted. This applies to TWebAction and TWebActionNoSaveState.
(Then WHY were those removed? The retry layer was removed in order to simplify bug-tracking within WebHub and within custom applications (it was one reason that exceptions were hard to trace), and because it was best used in an interactive/gui environment where a human could press ignore or retry... which is not applicable in a web environment. The retry unit has been made free for anyone who needs it. The idledot was originally created to workaround a problem in Windows in 1995, where an application did not receive idle cycles when it was minimized. That problem does not exist on current operating systems, and while the idledot could be considered cute and fun (if you happened to find it on the toolbar and activate it), at this point it is unnecessary and a possible contributor to multi-thread complexity... another obstacle to easy debugging of projects.)
You will be able to easily update your projects if you observe the following guidelines.
(If you do not have a bulk search+replace utility, consider Finders Keepers,
free to use for 30 days, $29 shareware.)
retrydlg | |||
Search | for | do this | notes |
---|---|---|---|
*.pas, *.dpr | retrydlg | Delete or download. | If reasonable within your project, delete reference to the retrydlg unit. If you need to use the unit, download it and keep it with your custom units. |
retry | |||
Search | for | do this | notes |
*.dfm | retry | Delete reference to all Retry properties |
There will be 4 retry properties for each TIniFile (or derivative) component.
If you do not remove obsolete properties from the DFM prior to running the project with the v2.018 codebase, then you will see runtime (but not compiler) errors. An alternative way to accomplish this is to open EVERY form and datamodule within your project, and ignore warnings about "Retry" properties, and then SAVE the resulting form/datamodule without those properties. |
idledot | |||
Search | for | do this | notes |
*.pas, *.dpr | tpidle | Delete, download or change. | If reasonable within your project, delete reference to the tpidle unit. If you need to use the unit, download it and keep it with your custom units. Or, use some other type of on-idle process, such as that provided by TtpApplication.OnIdle. |
*.pas, *.dfm | menuidle or DoMenuItemIdle |
Delete | You may have menu implementation code that relates to the now-obsolete idle dot component. Delete it. You will generally find both "menuidle" and "DoMenuItemIdle" in the same files. |
*.pas,*.dfm | idle | Review |
This is a final check to make sure that any references to "idle" have nothing to do with the tpIdle unit.
There will be "idle..." properties in any form which used TtpComboBar, and those may be safely deleted. |
errormsg | |||
Search | for | do this | notes |
*.pas, *.dpr | errormsg | Delete or download. | Delete reference to the errormsg unit, or, if you need to use the unit, download and save with your custom units. |
tpconsol | |||
Search | for | do this | notes |
*.pas, *.dpr | tpconsol | Delete or download. | Delete reference to the tpconsol unit, or, if you need to use the unit, download and save with your custom units. |
weboutln | |||
Search | for | do this | notes |
*.pas, *.dpr | weboutln | See notes. | Change TOutline to TTreeView in your custom application, for use with the new version of TWebOutline. Or, download the source to the prior version, now named WebOutline.pas, which uses TOutline, and save that with your custom units. |
toolproc | |||
Search | for | do this | notes |
*.pas, *.dpr | toolproc | Delete or download. | Delete reference to the toolproc unit, or, if you need to use the unit, download and save with your custom units. |
pWebApp.WebServer.CgiServerName := 'www.mydomain.com';
If the appropriate value changes with each page request (because you are supporting multiple domains), then you should set the value in an event triggered with each page, such as in TWebApp.OnExecute.
One example of when an override is needed is when the public web server machine runs Apache and Apache passes dynamic requests via proxy through a firewall to a Microsoft IIS web server. In this case, the default cgiServerName equals the value passed from Apache, which may not be suitable for use with "bounces". For example, the value might be the LAN machine name, whereas a public domain name is needed.
The W-HTML call to the webaction component must use the .execute syntax, e.g. mywebaction.execute|parameters. This enables quick identification of the call as relating to a web action component (rather than an event macro).
SET|key1=value1[,key2=comma\,value1]The escape character escapes itself (ie \\).
Here is one example of a known problem case (which has been fixed): Create an app with a single page. Refresh the app. Request that page in the browser, it will not be found. Request the index page; then the page will be found. Presumably this error extends to cases with more pages, where the page requested after refresh is the same as the PageID last used within the WebHub system (by the most recent surfer or by any aspect of the code). Ref: support #00160.
Warning: WebActions that are not Refreshed at least once will not be found and will not execute. (Reason: we no longer look through all components in the entire project to find a web action, we only look in the official list which is populated as web actions refresh.) You may need to set tpOptions to updateOnLoad (instead of UpdateOnGet). Or, make sure each web action refreshes at least once, by calling RefreshWebActions in the Init method of each datamodule or form.
function TWebBasicSession.LoadFromDisk:Boolean; begin try Literals.Clear; Checked.Clear; Pending.Clear; TextAreas.Clear; SavedStates.Clear; Result:=LoadFromFile(SessionFileName); except {ignore} // no further changes
label.execute
and edit1.execute
,
and WebHub would send out the
Caption and Text properties respectively. This is no longer a feature as of v2.019.
However you still have two other ways of achieving the same thing. Either drop '.execute' entirely,
e.g. label
and edit1
,
or say label.caption
and edit1.text
to obtain
the caption and text. So please ... change 'execute' to '' or 'caption' or 'text'
if you are using TLabels and TCustomEdit controls within W-HTML.
RefreshWebActions(fmHTFSPanel);
function TranslateRGB(color: longint): Longint;
and
function ColorToHtmlColor(Color: TColor): String;
(Enhancements contributed by Ronan van Riet.)
When using SysUtils.StringReplace, use this flags: [rfReplaceAll,rfIgnoreCase]
Here is the source in case anyone needs the tpack version. HREF is no longer using it.
function StringReplace2(const Value,sThis,sWith:String):String;
// will completely remove a substring from the main string.
var
a1,a2:string;
begin
Result:=Value;
if PosCI(sThis,Value)>0 then begin
while SplitString(Result,sThis,a1,a2) do
Result:=a1+sWith+a2;
end;
end;
AppID | intentionally empty |
AppVers | Regular Application which displays version and date/time |
HubVers | default Hub Application which displays version and date/time |
WHCP | WebHub Control Panel application |
The "WebHub Control Panel" files still ship to the bin\whcp directory, and the WHCP AppID is created for new users, so that one may use that feature if desired.
The original "HubApp" source is available on the demos server only.
You should have no problems with the -install and -remove commands (for installing and removing the Hub as a service). You should have no problems with NET START and NET STOP commands. However you may have problems starting and stopping the service the first time the Windows Services Applet is run. In that case, please set the Hub to start manually (instead of automatic), and start it from a BAT file.
WinNT does not have a problem.
Win2000 requires a 1 millisecond delay.
XP Pro requires more than 1 millisecond delay and 500 is known to work.
Win2003 - no guideline yet.
Configure the desired delay through the runner's configuration file, WebHubRunner.cfg, in same directory as runisa.dll. Example file contents:
[comments] Set the FileUploadPath to any path on a local hard disk and make sure that there are sufficient permissions for files to be written to that path by the runisa.dll ISAPI runner. On Win2000 and WinXPPro, set the DelayReturnInMilliseconds to a number from 1 and 500, to prevent blank page errors in IE. [WebHubISAPIRunner] FileUploadPath=d:\AppsData\HTTP\scripts\upload DelayReturnInMilliseconds=1