WebHub Object Pascal Components
- Delphi 6 not supported v2.106
- WebHub v2.104 was the last build compiled for Delphi 6.
- We are not supporting Delphi 6 any more because it has $IFDEF...$ENDIF but not $IF...$IFEND. The latter is
a more powerful syntax which allows multiple criteria ... which is very much needed for multi platform
support. The cost of code maintenance is simply too high.
- We recommend that owners of Delphi 6 upgrade to Delphi 7 or Delphi 2007 or the latest Unicode version of Delphi.
Talk to your local Delphi sales rep for pricing deals (there usually are some). You should qualify for upgrade
pricing.
- TPack MultiTypeApp refactored v2.105
- If you have compiled services with earlier code, please uninstall your old service, compile the new one, and
then install the new one. It will not work without uninstalling and reinstalling.
-
MultiTypeApp logic was simplified and code supporting different work modes was extracted into new units:
- MultiTypeAppCon.pas console (think linux daemon)
- MultiTypeAppGUI.pas graphical user interface (normal windows app, or linux with appropriate desktop)
- MultiTypeAppSvc.pas windows service
- When running as a service, use TtpProject. In TtpProject's event for creating forms, call
Application.MainForm.Visible := Application.IsUIEnabled; // requires tpProj
- Instead of EnableGUI (deprecated) function it is possible to call {M}Application.IsUIEnabled method.
- ForceEnableGUI and ForceForceGUI (deprecated) functions no longer do anything and remain just for compilation compatibility.
- Specific service application functions have been removed from {M}Application and now accessible from SvcApplication variable (when PREVENTSVCMGR is not defined).
- By default, standard application is started in GUI mode. The following command line keys are available, although
WebHub users can control these features more easily by setting flags in the application-level config file:
- /minimize - minimize (default action)
- /show and /restore - show application window
- /hide - completely hide application (including tray icon).
Default start behavior (minimize to tray) can be changed in application settings.
- In service mode all parameters defined during installation are available on next service starts. For example, the following commands sequence installs and starts service with appid=adv:
ServiceApp /install /appid=adv
net start ServiceApp
Parameters values set in net start have higher priority than installation parameters
- If you always want to see a GUI for your service, install with the /debug parameter, i.e.
ServiceApp /install /appid=adv /debug
However, in v2.105 and v2.106, as-service, there are exceptions when you stop the service.
- tpProj.pas was modified to correspond with MultiTypeApp. Now code has no need for conditional compilation directives depending on mode.
- Regarding GUI separation, ExtCtrl (TTimer) unit usages still remains. Probably the timer will be removed from this unit completely/soon. Right now, it is used for service name checks (related to /num parameter).
- TtpProject.TrueProjectStart now calls CoInitialize to support TADOQuery and other components that use COM.
This feature was included in WebHub 1 through 2.064. If you are not using COM, you could comment out the
call to CoInitialize. The way this is being done will be different in v2.107.
- As-Service v2.106
- Forms and data modules are constructed in main thread using TThread.Synchronize method now. CoInitialize is not needed any more, because it is called automatically in the main thread. There are no errors during service termination in standard application now.
- Service is always installed with GUI support. It is not used by default, but tray and form appears if /debug parameter is specified. The /debug parameter can be used in net start command. It can also be used at the moment of
installing the service, and then the GUI will be always enabled.
- If any of the events called by TtpProject set Continue to False, the service does not "start successfully."
This means that you can cause a fatal error, for example, if the database is unavailable and you do not want your
service to run at all.
- If your WebHub application has access violations when it stops, see whether you have code in the On-Stop event
of TtpProject, and if so, make sure that none of that is trying to reference objects which might already be nil
(especially pWebApp).
- TtpProject.OnStartupComplete event added v2.106
- In WebHub apps, this event can be used to remove a cover page (which was in place during startup), regardless of whether a GUI is active.
- TtpProject strings added v2.106
- You may use the Identifier and Item strings in any way.
- Identifier is Published, so you can save it to your DFM.
- Item is a Public string.
- The WebHub demos use the Identifier to hold the pWebApp.AppID and the Item to hold the
Cover Page filespec.
- whsample_EvtHandlers.pas improved slightly v2.105
- WebAppUpdate: begin/end added
- NewSession handler: improved slightly
- BadBrowser handler: added assertion, improved slightly
- dmWHApp.pas, dmwhBDEApp.pas improved re automatic menu v2.106
- The special action lists in those datamodules now connect themselves to the app, central info and
connection components at runtime, which avoids the need for storing dozens of actions in the DFM and makes
the files more likely to upgrade (in the future, when verbs change) without any modification.
- Improvements for Surfers using a Proxy v2.106
- Request.XForwardedFor will contain the real ip number - if the proxy provides it.
- Request.ProxyName will contain the proxy's name - if provided.
- Session.SessionFirstIP will contain the XForwardedFor information (if non-blank), else the usual
RemoteAddress.
- When a proxy is in use and is providing XForwardedFor, Request.RemoteAddress will be the address of the Proxy.
- The OnBadIP event now respects XForwardedFor and will not bounce a surfer as long as the Proxy is correctly
sending the XForwardedFor information.
- GUI separated by unit v2.106
- We are still working on separating all code which requires (Q)Forms into its own unit.
- Separation complete:
- tpList
- tpListGUI
- webList
- webListGUI
- webIList
- webIListGUI
- updateOK
- updateOKGUI
- Change uses clause in interface of forms from
updateOK
to
updateOK{non-gui}, updateOKGUI
- Change calls to
UpdateEditor
to GUI.UpdateEditor
e.g. Pages.GUI.UpdateEditor
- Change
with pWebApp, Tekeros do
with TpaAppChunks(EditingInControl.Tag) do
to
// uses webListGUI
with Tekeros, TwhStringListGUI.GetGUI(Tekeros) do
with TpaAppChunks(EditingInControl.Tag) do
- This is very rare; if you have
UpdateEditor
in your *.pas files, change
pWebApp.Tekeros.GUI.UpdateEditor;
to
with pWebApp, Tekeros, TwhStringListGUI.GetGUI(Tekeros) do
UpdateEditor;
- Remove
GUIShowResponse = outQuick
from DFM files (unlikely that you would have this).
- Refactored units:
- tpUIBase
- tpAction
- tpActionGUI
- Search for TtpVCLAction in DFM files and delete any nested TtpVCLAction objects.
- Search for TtpVCLAction in PAS files and delete any specific app-actions such as
app_Properties1: TtpVCLAction;
- GUI separated further v2.107
- Separation complete:
- ucDlgs
- ucDlgsGUI
- webColl
- webCollGUI
- webInfoU
- webInfoUGUI
- tpApplic
- tpApplicGUI
- webBrows
- webBrowsGUI
- htmlCore
- htmlCoreGUI
- webSend
- webSendGUI
- WebBase
- WebBaseGUI
- cgiServ
- cgiServGUI
- webSplat
- webSplatGUI
- Units below were updated to correspond with the changes:
- xtension
- webCall
- webCore
- webPage
- webRead
- wpcList
- MultiTypeApp
- MultiTypeAppCon
- MultiTypeAppGUI
- MultiTypeAppSvc
- restorer
- xtension
- In uses clauses for *.pas of forms but not datamodules, change
tpApplic
to tpApplic{non-gui}, tpApplicGUI
.
- Search string for use with FuzRegex: tpApplic[\s,;]
- Fixed issue with remote refresh v2.106
- Remote Refresh led to an access violation in v2.106. Fixed in the webSend unit.
- INPUTTEXTAREA no longer reports warning for blank data v2.106
- Previously, if you called INPUTTEXTAREA|sample, and the sample textarea was empty, and you were
logging errors or showing errors in the summary, you would see a warning about the empty data...
which was unfair.
- ucDlgsGUI unit: list in DPR for standalone projects v2.106+
- If you were using ucDlgs for AskQuestionYesNo or other important messages, add ucDlgsGUI to the uses list in your DPR. Otherwise, ucDlgsGUI will not be linked into your EXE (this is a feature) and
the messages will never appear (this can be a big problem for end-users!).
- As-Service: improved v2.108
- Confirmed: you can create a service using MultiTypeApp and without using TtpProject. There are
more features if you use TtpProject however. In particular, the feature of getting the Service Name from
the version resource is done by TtpProject.
- Restorer: massively improved v2.108
- Each TutParentForm (panel) can opt in or out of the Restorer behavior.
- The following are probably worth overriding if you write your own panels:
function RestorerActiveHere: Boolean; virtual;
function RestorerPartialXPath: string; virtual;
procedure Save(InRestorer: TFormRestorer); virtual;
procedure Load(InRestorer: TFormRestorer); virtual;
procedure DetachOnStartup(InRestorer: TFormRestorer); virtual;
- If you had code such as the following (to disable the restorer in earlier versions), you can delete
it to try the restorer in version 2.108.
if Assigned(fmWebHubMainForm.Restorer) then
begin
fmWebHubMainForm.Restorer.Flags := []; // disable for v2.098
end;
- WebHub New-Project Wizard v2.108
- DPR no longer includes ForceEnableGUI (as it is no longer required for quick WebHub apps).
- AppPanel.pas includes the methods that you would most likely want to override to use the restorer
features. Therefore, if you create a new panel using the WebHub Wizard and select the AppPanel.pas unit,
you will have those immediately available.
- WebHub with Rubicon
- WebHub is fully compatible with Rubicon. You can install the free trial version of
Rubicon v3.036+ into a machine which already has WebHub installed. During installation, be sure to install
the webRubi unit, which is a webaction to help you display Rubicon results in a WebHub application.
- TtpProject; setting var Continue: Boolean to False v2.108
- An underlying issue has been fixed in utThread such that you can now set the boolean
Continue := False;
in
any of your OnCreate... handlers on TtpProject, and the project will stop loading, and your code in the Event Handler for OnError will be called.
- SetLocalVar command now supports parentils around value v2.108
- The
appvers
example shows sample usage. See AppVersion.whteko, which installs with the runtime system.
- MultiTypeAppSvc serious bug fixed v2.109
- Application.Handle must not equal 0 when used with WebHub. Ever.
- Stop/Start v2.109
- You can now call {M}Application.Terminate to stop a MultiTypeApp running as a normal application
or as a Windows service.
- Output panel shows output v2.109
- It had not been showing output in v2.108.
- GUI, as-service tray icon fix v2.109
- This issue has been fixed: if whLite (any webhub app)
is started by hub (invisible, as service), its form shows but there is no tray icon.
When form is minimized, gui is gone completely.
- Load of non-Western chars in .whteko: fix v2.109
- We retested the loading, display and overall processing of non-Western character data in
the .whteko files and that is working fine now.
(
top)
The Hub, WebHubAdmin, ZMAdmin
- Older Hub service must be uninstalled v2.105
- If you are working on a machine which already had a Hub,
please run
hub.exe -uninstall
to
uninstall the Hub service BEFORE installing WebHub Runtime v2.105. Or, if you did not see this note soon
enough, you can actually use the new hub.exe and do the same thing from a command prompt:
-uninstall
then -install
.
- Hub more responsive v2.106
- Initial tests show the Hub service works better than v2.104 in terms of being able to detect
previously-running WebHub apps immediately after it has been restarted.
- Hub: no error on Win2003 server shutdown v2.107
- One customer reports that a long-time problem of error-on-shutdown of Win2003 has gone away
with this edition.
- WebHubAdmin: fewer startup/exit errors v2.108
- Improvements in the restorer base classes make WebHubAdmin run more smoothly.
- EXEs and DLLs now code-signed v2.108
- The WebHub Runtime Setup, the Hub, ZMAdmin, WebHubAdmin, and the runner files are now
all code-signed by HREF Tools Corp. in order to make them more Vista-friendly.
(
top)
WebHub Runners
- Working on 64-bit runner v2.107
- The following changes were made to facilitate compilation in Free Pascal. Some additional IFDEFs have
been introduced in the source units indicated.
- apiMail: include path fix. TCriticalSection is a standard FPC class - changed to SyncObjs.TCriticalSection
- apiStatRunner: include path fix.
- cgiConst: include path fix. CGIWIN.RES resources duplication with standard fpc-res.res
- httpext: include path fix.
- isaWriteRunner: linked JwaWinNetWk unit
- NativeXml: procedure properties fixes. Removed Graphics usage.
- tpObservers: fixed
- tpSyncObjs: ported to FPC
- ucPos: ported to FPC
- ucShell: Application -> {M}Application
- utIPCObj: ported to FPC
- utThread: procedure properties fixes.
- whcfg_Runner: include path fix.
- whutil_ZaphodsMap: GetEnvironmentVariable -> SysUtils.GetEnvironmentVariable
- ZaphodsMap: GetEnvironmentVariable -> SysUtils.GetEnvironmentVariable
- ISAPI runner for 64-bit IIS v2.108
- This runner exists and is included in WebHub Runtime v2.108.
- Here is the line that you can put into a BAT file to toggle IIS into 64-bit mode (it is a double-negative, you are saying
"do NOT run in 32-bit mode on this 64-bit computer."
cscript %SYSTEMDRIVE%\inetpub\adminscripts\adsutil.vbs SET W3SVC/AppPools/Enable32bitAppOnWin64 0
- Less logging when peer closes connection v2.108
- This message, "WriteClient wrote X bytes and it was asked to write Y bytes," is not
a serious error as long as X equals Y, and will no longer be logged.
(
top)
Ever need to rename files with two or more dots in the name and find that DOS ren
does not work?
This does work: Regular Expression File Renaming Utility and it is free.
Copyright © 2009 HREF Tools Corp. All Rights Reserved. TPACK, RUBICON and STREAMCATCHER are registered trademarks of HREF Tools Corp.