Events sequence

Posted: 2017-01-17 in Events sequence

Try it with a command that does not change the focus – valid() is called before the control has lost focus. e.g. instead of messageBox(“…”) or wait window “…”
Lianja.writeLog(“…”)


Q:
where I should place the code to initially disable some of the buttons in canvass section upon running/opening the project?
A:
In the section “Ready” delegate.


Q:
Is it possible to change the textbox input mask based on the selected combo box value?
This doesn’t seem to work in the Web App View.

Code:
function client_secsearch_cbosearchwhat_interactivechange()
{
        switch (upper(cbosearchwhat.text))
        {
            case "CLIENT NUMBER (XX####)":
                txtsearch.inputmask = "^^9999";
                break;
            case "PHONE (##########)":
                txtsearch.inputmask = "9999999999";
                break;
            case "ADDRESS":
            case "CLIENT NAME":
                txtsearch.inputmask = replicate("!",30);
                break; 
        }       
};

When the web app view is loaded, the input mask remains the same as the last reference used in the pages workspace.
A:
Try using the ‘Change’ (changed()) delegate instead of ‘Interactive Change‘.


The events are called in the order:
“init”,
“load”,
“ready”,
“activate”
from the App: (mnemonic help:
ILRA)

App
– First Page
– First Section of the first Page
— The Fields the first Section
– Section II of the first Page
— The Fields of the second Section
– …
— …
– Second Page
– …
— …

If a variable is required for particular component would normally be declared / initialized in the “init” or “init” earlier in the hierarchy.
The database is available for events of “load“.
For visual properties, such as section.collapse (), wait for the internal load and display have been completed – put them in the “ready” event for the component.



Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s