I built a App for data loading from SQL. Here is two Text box for start and end data time select. Now I want to use the current time as the end time once the app running. But I can not achieve it as below shown. Could you show
OnModuleLoad({},
s = Format( today(), "Format Pattern", "<YYYY><-><MM><-><DD>" );
txt_endTime<<set text(s);
);
I don't use application builder but I think you might have to move that outside of OnModuleLoad
Or maybe have the string creation inside onmoduleload and setting it outside (after objects have been created)
Agree with @jthi here - OnModuleLoad is basically a pseudo-function to receive arguments from another module at creation time - useful for creating things like launchers that instantiate other modules.
Below are the default arguments included in a Module script - anything that uses the symbols created by the Module has to be placed after the thisModuleInstance << Create Objects;
line:
// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);
thisModuleInstance << Create Objects;
// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").
I don't use application builder but I think you might have to move that outside of OnModuleLoad
Or maybe have the string creation inside onmoduleload and setting it outside (after objects have been created)
Agree with @jthi here - OnModuleLoad is basically a pseudo-function to receive arguments from another module at creation time - useful for creating things like launchers that instantiate other modules.
Below are the default arguments included in a Module script - anything that uses the symbols created by the Module has to be placed after the thisModuleInstance << Create Objects;
line:
// This special function will receive parameters passed to CreateInstance()
OnModuleLoad({},
);
thisModuleInstance << Create Objects;
// After this point your module instance objects have been created
// and can be referred to by name (for example, "Button1").
Got it. Thanks all very much!
Thanks! Your suggestion is right.