I have the following window:
What I am trying to do is to enable the 'Select data to import' button after pressing enter at the Number Edit window above.
docId = "xxxxxx";
WidthDescripWin = 500;
init_value =31;
win = New Window("Landing page for study evaluation add-in",
<<On close(EndAddin()),
<< Padding( {Left( 10 ), Top( 10 ), Right( 10 ), Bottom( 10 )} ),
// Construction of landing page. From here data is imported and analysis initiated
H Center Box(promptTitle = Text Box("Compat study evaluation")),
Spacer Box(Size(10,10)),
//H Center Box(promptV = Text Box("Add-in version: " || substitute(char(format(addin_version, "Fixed Dec", 1)),",","."))),
H Center Box(promptV = Text Box("Add-in version: 0.2" )),
H Center Box(promptDoc = Text Box("Documentation report: " || char(docId))),
Spacer Box(Size(10,10)),
Panel Box("Description of Add-in:",
Text Box("This add-in has been created to ease and standardize the statistical analysis of data coming from" ||
" compatibility studies. The general structure of compatiblity studies is an comparison of parameter developments" ||
" for samples impacted by a given influence of interest and corresponding reference samples.", <<set width(WidthDescripWin))
),
Spacer Box(Size(10,10)),
Panel Box( "Data selection for analysis. Please follow the instructions:",
Text Box("The data file is expected to be a standard pull from *****. Thus the file should have a sheet named" ||
" Details. \!N \!NPlease follow the instructions\!N1) Please input the row number containing the column names"||
" and press Enter.\!N2)Once the button 'Select data to import' is enabled, click on it and select your dataset." ||
" \!N3) Click 'Run analysis' to continue", <<set width(WidthDescripWin)
),
Spacer Box(Size(10,10)),
H Center Box(Lineup Box( NCol(2),
Text Box("Enter the Row Number of the Column Names"),
row_no = Number Edit Box(init_value, << Set Function(Function({this}, init_value = this << get; enter_row_start();)));
),
),
Spacer Box(Size(10,10)),
H Center Box(
H List Box(
bboxImp = button box( "Select data to import", importData()), // Importing data
Spacer Box(Size(10,10)),
bboxRe = button box( "Remove imported data", importRedo()), // Allow for reimport data
),
),
Spacer Box(Size(10,10)),
H Center Box(
H List Box(
bboxAn = button box("Run analysis", compatStudyEval()), // Perform analysis
Spacer Box(Size(10,10)),
bboxEnd = button box("End analysis", endAddin()) // Close landing page for add-in
),
),
),
);
// Change font in landing page window
promptTitle << Font("Times New Roman", 14, "Bold");
promptV << Font("Times New Roman", 10, "Bold");
promptDoc << Font("Times New Roman", 10, "Bold");
bboxRe << enable(0);
bboxAn << enable(0);
bboxImp << enable(0);
// ----------------------------------------
// ----- STEP 3: FUNCTION DEFINITIONS -----
// ----------------------------------------
enter_row_start = Function({},
bboxImp << enable(1);
);
the way that I am trying to do that without success is using the following piece of code:
where the enter_row_start() function just has the enable command.
Is it possible to do that?
what am I doing wrong?