Back to
index
GUI Customisation
This document summarises the points at which you can easily
customise gui integration behaviour.
There are a number of protected virtual methods provided in the
helper classes. Simply override these methods to provide your own
processing.
CLASS dbEditHelper User Hook Methods
- EnteringAboutToLoad
- Called just before copying record values into controls.
Controls should be fully constructed at this point, by the
mechanism specific to the particular GUI, and probably initialised
to default values.
-
- EnteringAfterLoad
- Called after record values are loaded into controls. If you
have any unlinked controls which have values derived from the
database values, this is where you'd set them. (Alternatively,
once we implement virtual fields, you could have a virtual field
linked to the control.)
-
- CanLeaveRecord
- Called by all movement buttons and OK button. Default allows
departure from record but you can override for complex validation.
-
- ConfirmSave
- Called to provide user interaction to confirm a save,
typically if record is dirty. Returns a tri-state YNCancelT.
-
CLASS dbEditHelper Messages - alternative way to react
Some people may not want to subclass dbEditHelper and override the
above messages. You can also set messages of type unsigned long which
will be broadcast along the normal message handling for your
framework.
The accessor functions for the optional GUI messages are the
public methods with the same names as the above hook methods, with
the prefix msg. eg:
- msgEnteringAboutToLoad(yourMessageNum)
- sets the message broadcast by the default EnteringAboutToLoad
-
- unsigned long getMsg = msgEnteringAboutToLoad()
- gets the message broadcast by the default EnteringAboutToLoad
-
Note that if you override the user hooks, the above messages won't
be broadcast unless you do so, or call the dbEditHelper original
method.
Back to
index
(c) Copyright A.D. Software 1994-1997 (All Rights Reserved).
Last Updated: 8th March 1997