ui.Form.SetDefaultInitializer()

setDefaultInitializer() method is used to specify a default initialization function which will be used to run global processing of all forms opened by a program. This method accepts a function name as a parameter. It is a class method, thus it is called with the ui.Form method preceding the function call.

The initializer function referenced by the method must have a single parameter which should be of the ui.Form data type. Each time an object of ui.Form class is initialized in the program (e.g., using ui.Window.getForm()), the initialization function will be called and the new ui.Form object will be passed to the function as the parameter. Any form modifications made by the initialization function will affect the form associated with the ui.Form object passed as the parameter.

setDefaultInitializer() takes effect from the moment of its execution onwards. It has no effects on the form objects that were initialized before it was called: 

CALL ui.Form.SetDefaultInitializer("initform")

  ...

  FUNCTION initform(f)

    DEFINE f.ui.Form

      ...

  END FUNCTION

The initialization function name must be typed in the lower-case.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.