Kbase P62298: Dynamics: How to make a container start in add Mode?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  13/01/2004 |
|
Status: Unverified
GOAL:
How to make a container start in add Mode (addRecord)?
GOAL:
How to achieve a container that first add creates a record when launched?
FACT(s) (Environment):
Dynamics
FIX:
The following code has been successfully tested with Dynamics 2.1A01:
To put in YourContainer/initializeObject:
DEFINE VARIABLE cToolbarHandles AS CHARACTER NO-UNDO.
DEFINE VARIABLE hToolbar AS HANDLE NO-UNDO.
RUN SUPER.
cToolbarHandles = DYNAMIC-FUNCTION('getToolbarHandles':U IN TARGET-PROCEDURE).
hToolbar = WIDGET-HANDLE(ENTRY(1,cToolbarHandles)). /* In this example, we
actually expect only one handle in cToolbarHandles because we have only one
toolbar. */
PUBLISH "addRecord" FROM hToolbar. /*Subscriber is TableIO-target => SDB or SDB*/