be overridden as with other form system methods.
Common Methods to Override
FormRun.Init
This method initializes the form and its objects. This is the first event you can
override in connection with the startup of the form.
Never remove the super() call from this method, as it removes the initialization of
all the objects.
To make some manual initializations, formRun.init is typically used. This could
include the following tasks:
• Verification of the contents of the args-object received
• Initialization of supporting classes
• Dynamically changes to the design
If your manipulation needs access to the objects of the form, wait until the
super() call has executed.
FormRun.Run
The run method is called immediately after the init method. The super() call
makes the form window appear on the screen and performs a database search for
the data to be displayed in the form.
Typical reasons for overriding the formRun.run() method include, activating or
de-activating some fields, setting default values for controls or modifying the
query.
You must call super() if you override formRun.run() method, and you should
place your code before the super() call.
FormRun.CloseThis method shuts down the form. If you have cleanup in connection with
finishing the execution of the form, place it here.
One function available for implementation is when saving some options for
future use as in \Forms\ForecastPurch\Methods\close.
FormRun.ClosedOK
The formRun.closedOK() method is called when a Command Button with the
Type set to OK is clicked. The call to super() will close the form.
The formRun.ClosedOK() method is used when code is to be executed when
the user accepts the data that they have entered in the form is correct, and wants
to exit, as with many standard windows forms.
For example:
1 2 3 4 5 6 | public void run() { FromDate.dateValue(systemDateGet() - dayofmth(systemDateGet()) + 1); super(); } |
Best Regards,
Hossein Karimi
No comments:
Post a Comment