여러분 안녕하세요! 2 개의 일련의 차트 중 하나를 선택할 수있는 사용자 창을 생성했습니다. 시리즈는 "곡선 만"또는 "곡선 및 데이터 점"입니다. 내 문제는 "모든 커브 선택"및 "모든 커브와 점 선택"옵션도 필요하다는 것입니다. 두 개의 "모두 선택"확인란이 훌륭하게 작동합니다. 그러나 곡선 차트 쪽에서 아무 것도 선택하고 "모든 곡선과 점 선택"확인란을 선택하지 않은 경우 (선택 및 선택 취소) 하나 이상을 개별적으로 선택하면 선택한 곡선 및 데이터 점 차트가 생성 할 차트 목록에 입력했습니다. 내가 도대체 뭘 잘못하고있는 겁니까? 코드가 포함되어 있습니다. 내 문제를 검토해 주셔서 감사합니다.
//Generate charts for selected data
GetCharts = {};
GetDPCharts = {};
//Window for user to select which charts to be generated
WhatCharts = New Window( "Select Curve Charts to Generate", << Modal,
<< On open( WhatCharts << Window Size( 200, 100 ) ),
H List Box(
//All charts wtih ONLY curves
cbAllCharts = Check Box( {"By Condition", "By Cond No", "By Sample", "Average by Condition"} ),
Spacer Box( Size( 10, 0 ) ),
//Charts with Data Points AND Curves
cbAllDPCharts = Check Box( {"By Condition w/ Data Points", "By Cond No w/ Data Points", "By Sample w/ Data Points", "Average by Condition w/ Data Points"})
),
//Allow the user to select all charts
H List Box(
cbAll = Check Box( " ",
<< Set Function(
Function( {this},
cbAllCharts << Set All( this << Get, run script( 1 ) )
)
),
),
Text Box( "Select All Curve Plots" ),
Spacer Box( Size( 9, 0 ) ),
cbAll2 = Check Box( " ",
<< Set Function(
Function( {this},
cbAllDPCharts << Set All( this << Get, run script( 1 ) )
)
),
),
Text Box( "Select all Points and Curve Plots" ),
),
H Center Box( Button Box( "OK", GetChkBoxes )
)
);
//Place all selections into one list
if( N Items( GetDPCharts ) > 0,
For( i = 1, i<= N Items( GetDPCharts ), i++,
Insert Into( GetCharts, GetDPCharts[i] )
)
);
//Expressions
GetChkBoxes = Expr(
GetCharts = cbAllCharts << Get Selected;
GetDPCharts = cbAllDPCharts << Get Selected;
);
Print( GetCharts, GetDPCharts );각 확인란에 자체 기능을 지정하고 모든 기능의 이름이 다른지 확인하십시오.
//Generate charts for selected databutton
GetCharts = {};
GetDPCharts = {};
//Window for user to select which charts to be generated
WhatCharts = New Window( "Select Curve Charts to Generate", << Modal, << Return Result,
//<< On open( WhatCharts << Window Size( 200, 100 ) ),
H List Box(
//All charts wtih ONLY curves
cbAllCharts = Check Box( {"By Condition", "By Cond No", "By Sample", "Average by Condition"},
<<SETFUNCTION> 0,
For( i = 1, i<= N Items( GetDPCharts ), i++,
Insert Into( GetCharts, GetDPCharts[i] )
)
);
Print( GetCharts, GetDPCharts );</SETFUNCTION>