결합 및 연결 번호 편집 상자 및 슬라이더 상자선택한 사용자가 차트를 작성하기 위해 선택할 테스트 목록이있는 창을 표시하는 JSL 스크립트를 작성 중입니다. 각 차트에는 사용자가 설정 한 간격이 있어야합니다. 이 예제에서는 차트를 생성하는 데 1 ~ 5 개의 테스트를 수행 할 수 있으므로 Number Edit Box가 명명되지 않은 경우 Number Edit Box를 참조하여 관련 테스트에 대한 올바른 값을 얻으려면 어떻게해야합니까? 제가 비틀 거리는 곳은 MakeCharts = expr ()의 질문입니다. 이 유형의 시나리오에서 각 Number Edit Box의 이름을 고유하게 지정하는 방법이 있습니까?
//Create a list of all tests represented in this Data Table to be displayed as vertical check boxes
cbAllTests = Check Box( {"Test1", "Test2", "Test3", "Test4", "Test5"} );
//User Interface for selecting desired test results and charts
New Window( "Enter Capability", << Modal,
//Window Header
H Center Box(
H List Box(
tbAddCap = Text Box( "Select Tests to Average" ),
tbAddCap << Set Font( "Arial", 14, "Bold" )
)
),
//Test List Header
Spacer Box( Size( 10, 20 ) ),
H List Box(
Spacer Box( Size( 35, 20 ) ),
tbCap = Text Box( "Test"),
tbCap << Set Font( "Arial", 12, "Bold" )
),
//List of tests from this STR or list of STRs to select from
H List Box(
Spacer Box( Size( 10, 10 ) ),
cbTest = cbAllTests( i )
),
Spacer Box( Size( 10, 20 ) ),
//Display new window listing tests selected for Capability Data Entry
H Center Box( Button Box( "OK", GetChkBoxes ) )
);
//Window to Display Number Edit Boxes to enter values for only the tests being requested
CapWindow = New Window( "Enter Capability",
//Window Header
H Center Box(
H List Box(
tbEntVal = Text Box( "Enter Capability Values*" ),
tbEntVAl << Set Font( "Arial", 14, "Bold" )
)
),
//List of tests requested for Capability Value entry
H List Box(
vlbTests = V List Box()
),
H Center Box( Button Box( "OK", MakeCharts ) ) //WJL - Add procedure to collect values and add selected charts
);
if( N Items( CapTests ) >=1,
For( i = 1, i <= N Items( CapTests), i++,
Eval(
Expr(
vlbTests << Append(
H List Box(
Lineup Box( N Col(4),
tbTest = Text Box( CapTests[i] ),
tbTest << Set Width( 150 ),
tbPlMin = Text Box( "+/-" ),
tbPlMin << Set Font( "Arial", 10 ),
nebCap = Number Edit Box(0),
nebCap << Set Font( "Arial", 10 ),
tbUnits = Text Box( " % " ),
tbUnits << Set Font( "Arial", 10 )
)
)
)
)
)
)
);
GetChkBoxes = Expr(
CapTests = cbTest << Get Selected();
print( CapTests );
);
MakeCharts = Expr(
//This is where I need to collect the values in each Number Edit Box
//How do I reference when they are not uniquely named in the script?
);제목 : Re : 결합 및 연결 번호 편집 상자 및 슬라이더 상자이 문제를 해결하는 한 가지 방법이 있습니다. 번호 편집 상자에 대한 포인터가 목록에 배치 된 다음 목록의 요소를 사용하여 특정 번호 편집 상자를 다시 가리 킵니다.
//Create a list of all tests represented in this Data Table to be displayed as vertical check boxes
cbAllTests = Check Box( {"Test1", "Test2", "Test3", "Test4", "Test5"} );
// This code needs to be processed before it is called
GetChkBoxes = Expr(
CapTests = cbTest << Get Selected();
print( CapTests );
);
//User Interface for selecting desired test results and charts
New Window( "Enter Capability", << Modal,
//Window Header
H Center Box(
H List Box(
tbAddCap = Text Box( "Select Tests to Average" ),
tbAddCap << Set Font( "Arial", 14, "Bold" )
)
),
//Test List Header
Spacer Box( Size( 10, 20 ) ),
H List Box(
Spacer Box( Size( 35, 20 ) ),
tbCap = Text Box( "Test"),
tbCap << Set Font( "Arial", 12, "Bold" )
),
//List of tests from this STR or list of STRs to select from
H List Box(
Spacer Box( Size( 10, 10 ) ),
cbTest = cbAllTests( i )
),
Spacer Box( Size( 10, 20 ) ),
//Display new window listing tests selected for Capability Data Entry
H Center Box( Button Box( "OK", GetChkBoxes ) )
);
//Window to Display Number Edit Boxes to enter values for only the tests being requested
CapWindow = New Window( "Enter Capability",
//Window Header
H Center Box(
H List Box(
tbEntVal = Text Box( "Enter Capability Values*" ),
tbEntVAl << Set Font( "Arial", 14, "Bold" )
)
),
//List of tests requested for Capability Value entry
H List Box(
vlbTests = V List Box()
),
H Center Box( Button Box( "OK", MakeCharts ) ) //WJL - Add procedure to collect values and add selected charts
);
// create a list to hold the pointers to the different Number Edit Boxes
nebCapList = {};
if( N Items( CapTests ) >=1,
For( i = 1, i <= N Items( CapTests), i++,
//Eval(
//Expr(
vlbTests << Append(
H List Box(
Lineup Box( N Col(4),
tbTest = Text Box( CapTests[i] ),
tbTest << Set Width( 150 ),
tbPlMin = Text Box( "+/-" ),
tbPlMin << Set Font( "Arial", 10 ),
nebCap = Number Edit Box(0),
nebCap << Set Font( "Arial", 10 ),
tbUnits = Text Box( " % " ),
tbUnits << Set Font( "Arial", 10 )
)
)
);
// add the pointer to the Number Edit Box, to the list
insert into(nebCapList,nebCap);
)
//)
//)
);
nebCapList[1] << set(55);
MakeCharts = Expr(
//This is where I need to collect the values in each Number Edit Box
//How do I reference when they are not uniquely named in the script?
);제목 : Re : 결합 및 연결 번호 편집 상자 및 슬라이더 상자 @txnelson - 늦게 회신 해 드려 죄송합니다. 드디어 제안을 행동에 옮겨야합니다 ... 감사합니다 !!!! 그게 티켓 이었어. 그것은 완벽!