- Note (1) TWebCommandLine.SyncMode v1.480+
This is a new property. If set incorrectly, your web application
not connect to the Hub. The problem applies to you only if you have built
your own main form, i.e. you are not using the shared appmain.pas or appmaidb.pas
file... The shared files have all been updated already. Keep reading to see what to do for
your own forms.
For use with COM/DCOM, (a) set SyncMode to synSynMsg; and (b) make sure your main
form has a TtpApplication component; and (c) program its OnIdle event like this:
procedure TfmWebAppMainForm.tpApplication1Idle(Sender:TObject;var Done:Boolean);
if assigned(WebCommandLine) then
Code examples: ht\htfrm\appmain.pas (consistent with prior builds) and ht\htfrm\dmWebHub and
ht\htfrm\dmWHApp (new shared data modules - optional/interesting).
If you are not using COM/DCOM, it is still ok to use the above technique, or you can
just set SyncMode equal to SynSync.
- COM/DCOM support v1.48
The new class, TWebDCom, makes it possible to integrate with COM and DCOM objects.
The new COM macro uses this component transparently.
- Note (2) New Package Names v1.47
This is n/a for Delphi 2 users. In order to make it possible for the Hub to share
a package with web apps on the same server, and to eliminate dependencies on the BDE, a
new naming convention has been adopted for the WebHub package files.
WebHub.dpk now ships as ht\pkg\more\whub30.dpk. The default installation
will now be to use two (2) packages: whub30 plus whubdb30. The latter contains
the units that require the BDE. whDemo30 remains a completely separate package,
replacing whdemos; it is still only required for the fish store demo.
The ht\pkg\read-pkg.pas file has been updated to explain the new filenames
If you are using packages in your projects, you will
need to go to Project|Options, Packages tab and change
As of v1.481, Packages are compiled and installed automatically. YES!!!
- Refresh All Instances v1.470
New component TtpSharedLongInt and a new shared form, ht\htfrm\whShared.pas, let you
easily refresh all running instances of a WebHub application. You can, in fact, make
any arbitrary action occur in all instances if you add your feature ideas to the
whShared form. The new appmain.pas and appmaidb.pas files are set up to work
with this new form. You'll need to uncomment one #DEFINE and add whShared to your
project. The code is hooked up to the app's onUpdate event automatically (via that
#DEFINE). The new wizard includes whShared so you can add it with File|New|WebHub Form.
- Note (3) Major change to TWebAction parameters v1.48
This effects programmers who were using OnSetCommand to get the value of
the parameter passed from WebHub-HTML, e.g.
That parameter is now available as a property on the twebaction named
HTMLParam. (Hooray.) You no longer need to use OnSetCommand to
catch it in case there was an overriding value on the URL.
If you want to be forward and backward compatible in your own
DefaultsTo(Command,HtmlParam) instead of
Command from inside the pascal. This means: use the Command
from the URL if non-blank else use the HtmlParam. If you're not
worried about backwards compatibility with existing WebHub-HTML, just use the
HtmlParam property directly.
The twebaction.command property will continue to equal any value that
was passed on the WebHub command line, i.e. in the URL.
Here is further explanation:
- setting on the URL: ....:mycomponent.123
- executing in the HTML: %=mycomponent.execute=%
...specifically *requires* the use of the DefaultsTo form, viz:
parameter := DefaultsTo((Sender as TWebAction).Command,(Sender as TWebAction).HTMLParam);
In other words, if you just use HTMLParam alone, you'll lose any
information which is otherwise passed on the URL.
pWebapp.command will be "MyComponent.123"
MyComponent.command will be "123"
MyComponent.HTMLParam will be ""
Whereas if I use %=MyComponent.execute|456" then the first two will be
the same, but HTMLParam will be 456.
Here is a function you can use to cover both cases:
function GetURLorHTMLParam(Sender: TObject): string;
result := DefaultsTo((Sender as TWebAction).Command,(Sender as TWebAction).HTMLParam);
- Fixed sharing of session var files v1.48
Fixed a bug where a session file could falsely not be read because another instance of
the application was saving the session file. This only applied to people running
server clusters with shared session directories. You need to upgrade the Hub and
your components to v1.48+ to get this fix.
- changes in TWebCommandline v1.47
Removed procedure ExecuteDCOM and property OnDCOM. Renamed OnSuspendOn/Off to
OnSuspend and OnResume. These events are now customized in the standard
appmain.pas and appmaidb.pas files as shipped.
- MATCH macro can do 'contains' operation v1.47
'$' is equivalent to IsIn (a TPack function).
'[' gives a standard 'contains' operation, i.e. case insensitive pos > 0.
- Removed properties from TWhSession v1.480
The following properties are gone: BackGroundOk, ImagesOk, HTML3Ok, MetaRefreshOk,
FramesOk. The new TWhBrowserInfo component handles the job of browser differentiation now.
- Removed conditional HTML processing of %= IMG and %= BODY v1.480
- PAGE macro v.1490
WebHub v1.48x had a problem if you used the PAGE macro from inside an
TWebAction.OnExecute event handler. That is again supported fully in v1.490.
- TWebDBlistBox v1.47
Fixed problem with BlankItem when set to False. (Thanks, Matt and Allen!)
- TWebListmaster v1.47
This component and TWebListMasterBasic have been removed from the standard palette.
Source is available free upon request for prior registered users.
- Running Delphi twice v1.47
The inclusion of the ucOnce unit in the WebHub package had prevented you from
running more than once instance of Delphi. That unit is not longer included in
packages. You may still use it in your own projects if desired.
- New Built-in Macros v1.48
Please see the WebHub Help file for details on these and all other
built-in macros. New: FOR, INC, DEC, DELKEYS, CRUNCHKEYS, LIT.
- Complete set of INPUT macros for use with forms v1.46 and v1.48x
INPUTCHECKBOX, INPUTFILE, INPUTFORM, INPUTHIDDEN, INPUTIMAGE, INPUTNUMBER, INPUTPASSWORD, INPUTRADIO, INPUTSUBMIT, INPUTTEXT, INPUTTEXTAREA. INPUTTEXTAREA works correctly as of v1.484.
There is also an updated ht\htexe\webhub.txt template (thanks, Martha!). When you
are in the W-HTML Editor, right-click, choose Insert Markup and you'll have a menu
to choose macros (with syntax guides) from.
- Sticky window resize v1.484
v1.46 thru 1.482 had a problem with resizing; you had to
click twice to release the form resizing... fixed.
- .Refresh from WebHub-HTML v1.484
%=htwebapp.refresh=% generated an overflow error in 1.482. Fixed.
- TTextGrid function renamed to DeletedRow v1.48