연구 설문조사: Blockly 사용 경험을 알려주세요
설문조사 시작
blockly > FieldVariable > initModel
FieldVariable.initModel() 메서드
이 필드의 모델이 아직 초기화되지 않은 경우 초기화합니다. 첫 번째 렌더링에서 값이 변수로 설정되지 않은 경우 값을 잘못되게 두지 않고 변수를 만듭니다.
서명:
initModel(): void;
반환:
void
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-09(UTC)
[null,null,["최종 업데이트: 2024-11-09(UTC)"],[[["The `initModel` method initializes the FieldVariable model if it hasn't been initialized yet."],["If a variable hasn't been assigned to the field's value by the initial rendering, `initModel` creates a new variable to prevent an invalid value state."],["This method ensures that the FieldVariable has a valid associated variable, either pre-existing or newly created."],["The method does not return any value (void)."]]],["The `initModel()` method for `FieldVariable` initializes the field's model if it hasn't been. If a variable hasn't been assigned to the field before the first render, the method creates a variable. This action prevents the field's value from being invalid. The method returns nothing.\n"]]