Is it possible to pass arguments to a form so that a method executed onShow could do something based on that argument?
As am experiment, I placed the following code in a method that is executed onShow:
plugins.dialogs.showInfoDialog('On Show', 'I am in onShow and there are ' + arguments.length + ' arguments\nthe argument is ' + arguments[0], 'ok')
The first time I access this form, the dialog displays 1 argument and it is ‘true’. If I display another form and come back to the first one, the argument is ‘false’.
Where is this argument set and what is it used for?
ROCLASI:
Why not just pass the argument to the method that is triggered on Show ?
I have a method (myMethod1) that performs:
application.showForm(myForm2);
onShow for myForm2 executes myMethod2. How would I pass an argument to myMethod2 as you suggest above.
Or are you suggesting that myMethod1 call myMethod2(myArgument) and have myMethod2 perform the application.showForm(myForm2);
I guess that would work.
ROCLASI:
Or else use a global var and let the method read that.
That would work too, but I am trying to limit the number of globals that I have to the bare minimum.