Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > CodeGenerator > isInitialized
Właściwość CodeGenerator.isInitialized
Określa, czy metoda init została wywołana. Generatory, które ustawią tę flagę na „false” po utworzeniu i na „true” w init, będą powodować, że blockToCode będzie wyświetlać ostrzeżenie, jeśli generator nie został zainicjowany. Jeśli flaga nie zostanie zmieniona, nic się nie zmieni.
Podpis:
isInitialized: boolean | null;
O ile nie stwierdzono inaczej, treść tej strony jest objęta licencją Creative Commons – uznanie autorstwa 4.0, a fragmenty kodu są dostępne na licencji Apache 2.0. Szczegółowe informacje na ten temat zawierają zasady dotyczące witryny Google Developers. Java jest zastrzeżonym znakiem towarowym firmy Oracle i jej podmiotów stowarzyszonych.
Ostatnia aktualizacja: 2025-07-25 UTC.
[null,null,["Ostatnia aktualizacja: 2025-07-25 UTC."],[],["The `isInitialized` property, found within the `CodeGenerator` class, indicates if the generator's `init` method has been executed. It's a boolean or null value. When set to `false` and then `true` during initialization, it triggers a warning during `blockToCode` if the generator is not initialized. Leaving the flag untouched has no effect. It ensures that a warning is triggered if the generator is not initialized before being used.\n"]]