Release 10.1A: OpenEdge Development:
ADM Reference

> ## createObjects

> Standard procedure for running objects in a Container. This procedure runs the AppBuilder-generated procedure named adm–create–objects for compatibility with Version 8.

> Location: containr.p

> Parameters: None

> Notes:

> - This procedure runs adm–create–objects, the AppBuilder-generated procedure that creates and initializes all the SmartObjects in a Container. This allows both the AppBuilder-generated code and any customization of it to exist in the same SmartContainer procedure, because the customization is called using createObjects.

> - This can be customized to add application-specific behavior to the creation of SmartObjects in a Container. createObjects runs once for each page as it is initialized, so code in a custom version should always check the CurrentPage property to verify that the custom code is executed for the proper page (0 for general code to be executed exactly once).

> Examples:

>     PROCEDURE createObjects:
>     /* Purpose: Add some extra objects to key pages. Note that because these
>        objects are being created by custom code, they will not appear in the
>        AppBuilder at design time. */
>        DEFINE VARIABLE hWin AS HANDLE NO-UNDO.
>        RUN SUPER.  /* Get the other objects on this page created. */
>        /* Now create a child window which appears when page 100 is selected. */
>        IF DYNAMIC-FUNCTION(‘getCurrentPage’:U) = 100 THEN
>        DO:
>        RUN constructObject (INPUT ‘wChild.w’:U,    /* Master file to run */
>                             INPUT {&WINDOW-NAME},  /* parent handle      */
>                             INPUT ‘’:U,  /* No special Instance Properties */
>                             OUTPUT hWin).          /* New object handle */
>         /* Add a custom link; note that the Container link is always created
>            automatically. */
>        RUN addLink (THIS-PROCEDURE, ‘Custom’:U, hWin).
>       END.
>       RETURN.
>     END PROCEDURE.

Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095