cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar
zql3050
Level II

how to update the text box when app load

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);
);
2 ACCEPTED SOLUTIONS

Accepted Solutions
jthi
Super User

Re: how to update the text box when app load

I don't use application builder but I think you might have to move that outside of OnModuleLoad

jthi_0-1725014231778.png

Or maybe have the string creation inside onmoduleload and setting it outside (after objects have been created)

jthi_1-1725014310080.png

 

-Jarmo

View solution in original post

Re: how to update the text box when app load

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").

View solution in original post

4 REPLIES 4
jthi
Super User

Re: how to update the text box when app load

I don't use application builder but I think you might have to move that outside of OnModuleLoad

jthi_0-1725014231778.png

Or maybe have the string creation inside onmoduleload and setting it outside (after objects have been created)

jthi_1-1725014310080.png

 

-Jarmo

Re: how to update the text box when app load

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").

zql3050
Level II

Re: how to update the text box when app load

Got it. Thanks all very much!

zql3050
Level II

Re: how to update the text box when app load

Thanks! Your suggestion is right.