View Full Version : Input.GetText
Jason Pate
02-08-2005, 06:54 PM
How get I get input from a different screen than the one I am already on? I guess I could write it out to an INI file and load on on the next page, but that sounds like a LOT of work any Ideas??
Intrigued
02-08-2005, 07:10 PM
Remember, all variables are global in scope unless you signify differently via local. (Global = you can use it in your whole program as soon as you set the variable. Local = Just for the block of code that variable resides in)
With that in mind here is an example:
-- This code would go in Page1's On Show event (for example)
pg1_input = Input.GetText("Input1");
-- And this code would go in Page2's On Show event (for example)
Dialog.Message("Input Text from Page1's Input Object", pg1_input);
TJ_Tigger
02-08-2005, 08:34 PM
You could create a function that would capture all the input objects text and place that function on any button that could be used to leave the page. You could even use the CurrentPage name with the Input Objects name to store the variables so it might be easier for you to recall them.
1. Get the Page name - Application.GetCurrentPage
2. Get all objects on the page - Page.EnumerateObjects
3. Enumerate the objects and determine if the object is an Input Object - Page.GetObjectType
4. If it is then get the text and save it to a variable Page_InputName - Input.GetText
The variable name should always be unique that way
HTH to get you started.
Tigg
Jason Pate
02-09-2005, 06:51 PM
Compression = ComboBox.GetText("Compression")
DPI = Input.GetText("Input3")
bit = ComboBox.GetText("Bits")
page = ComboBox.GetText("page")
inputfolder = Input.GetText("PDFfolder")
outputfolder = Input.GetText("Tifffolder")
is on a settings page, but the main page has NULL for the values??
Intrigued
02-09-2005, 07:04 PM
Those Input Objects first need to receive (the user types data into them) input first.
Otherwise there is nothing (nil) stored in the variables you have setup.
And since the user has not even reached the page with the Input Objects and then entered data into those objects the variables are set to their defaults (nil).
Here is a very simple sample project to help. On Page2, click the ENTER key to submit the data. Then you are taken back to Page1 where the variable (data_input) now has data it is storing (what was typed into the Input Object).
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.