← 수업 제작 도구
홈 › Components › Table (표) › 화면 4

화면 4. Table.cellHasFocus [source]

원본: Computation Layer 문서(Table (표)) · Try It (원본 화면)

화면 번호4 / 17
문서 항목 설명 (원문)cellHasFocusrowIndex: number, columnIndex: number Gets a Boolean value that indicates whether or not the student is editing a cell given the row index and column index of the cell. (Row index 1 is the first row underneath the header.)

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 4 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1fruitGraph그래프
# Sets variables in the calculator in the calculator to 1 or 0
# depending on whether or particular cell in a table is
# focused or not. The calculator then uses those variable to
# change the display of the bar graph.
▷ 표의 특정 셀이 선택(포커스)되어 있는지 여부에 따라 계산기의 변수를 1 또는 0으로 정한다. 그러면 계산기는 그 변수들을 이용해 막대그래프의 표시를 바꾼다.

number("F_{1focus}"): when fruitTable.cellHasFocus(1,2) 1 otherwise 0
▶ 그래프의 변수 F_{1focus}는 표 fruitTable의 1행 2열 셀을 편집 중이면 1, 아니면 0으로 한다.
number("이름")은 그래핑 계산기 안의 변수 값을 정한다. cellHasFocus(행, 열)은 학생이 그 셀을 편집 중인지를 참 또는 거짓으로 알려 주고, when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.
number("F_{2focus}"): when fruitTable.cellHasFocus(2,2) 1 otherwise 0 ▶ 그래프의 변수 F_{2focus}는 표 fruitTable의 2행 2열 셀을 편집 중이면 1, 아니면 0으로 한다. number("F_{3focus}"): when fruitTable.cellHasFocus(3,2) 1 otherwise 0 ▶ 그래프의 변수 F_{3focus}는 표 fruitTable의 3행 2열 셀을 편집 중이면 1, 아니면 0으로 한다. number("F_{4focus}"): when fruitTable.cellHasFocus(4,1) or fruitTable.cellHasFocus(4,2) 1 otherwise 0 ▶ 그래프의 변수 F_{4focus}는 표 fruitTable의 4행 1열 셀 또는 4행 2열 셀을 편집 중이면 1, 아니면 0으로 한다.
or는 둘 중 하나라도 참이면 참이다.
number("F_{5focus}"): when fruitTable.cellHasFocus(5,1) or fruitTable.cellHasFocus(5,2) 1 otherwise 0 ▶ 그래프의 변수 F_{5focus}는 표 fruitTable의 5행 1열 셀 또는 5행 2열 셀을 편집 중이면 1, 아니면 0으로 한다.