Is this possible?
I want AMS to clear all Input Objects throughout the project when the user returns to page One.....
I have no idea how to do this...
Thanks
Professional Software Development Tools
Is this possible?
I want AMS to clear all Input Objects throughout the project when the user returns to page One.....
I have no idea how to do this...
Thanks
It can only be done one page at a time.
Page1, On Show Remember, this will only clear the inputs in page 1
Code:local tObjects = Page.EnumerateObjects(); if(tObjects)then for i, sObject in tObjects do if(Page.GetObjectType(sObject)==OBJECT_INPUT)then Input.SetText(sObject, ""); end end end
Thanks, that is what I thought!
So basically I will have to quite and then restart the AMS project to clear all?
Or you put it on every page's On Show event. Or you use variables.
Page 1 On Show
And on the other pages On Show event you placeCode:Input1_Content = ""; Input2_Content = ""; --etc.
and while you are on that page you could use the On Key event in the inputCode:Input.SetText("Input2', Input2_Content);
to set Input2_Content every keystroke.
Code:Input2_Content = Input.GetText(this);
just wrap the above code in a function and call it from each page or dialog
Edit, lol post same timeCode:function ClearAllInputs(FormType) local tObjects = FormType.EnumerateObjects(); if(tObjects)then for i, sObject in tObjects do if(Page.GetObjectType(sObject)==OBJECT_INPUT)then Input.SetText(sObject, ""); end end end end -- call from page ClearAllInputs(Page) -- call from dialog ClearAllInputs(DialogEx)![]()
Haha yeah, but your way is nicer lol, why didn't I think of that. I like your way of dealing with Page/DialogEx troubles hehe![]()
yeah the DialogEx system broke most of my page wide functions so i updated them with the same system, whenever i make a function that calls a "Page" action i always throw in that switch in case i ever need it in a dialog.