Zadbaj o dobrą organizację dzięki kolekcji
Zapisuj i kategoryzuj treści zgodnie ze swoimi preferencjami.
blockly > Zablokuj > getChildren
Metoda Block.getChildren()
Znajdź wszystkie bryły zagnieżdżone bezpośrednio w tym budynku. Obejmuje dane wejściowe wartości i instrukcji, a także dowolne poniższe instrukcje. Wyklucza połączenia na karcie wyników lub w poprzedzającej je instrukcji. Bloki można opcjonalnie sortować według pozycji. od góry do dołu.
Podpis:
getChildren(ordered: boolean): Block[];
Parametry
Parametr |
Typ |
Opis |
zamówione |
wartość logiczna |
Jeśli ma wartość prawda, sortuje listę. |
Zwroty:
Zablokuj[]
Tablica bloków.
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: 2024-08-21 UTC.
[[["Łatwo zrozumieć","easyToUnderstand","thumb-up"],["Rozwiązało to mój problem","solvedMyProblem","thumb-up"],["Inne","otherUp","thumb-up"]],[["Brak potrzebnych mi informacji","missingTheInformationINeed","thumb-down"],["Zbyt skomplikowane / zbyt wiele czynności do wykonania","tooComplicatedTooManySteps","thumb-down"],["Nieaktualne treści","outOfDate","thumb-down"],["Problem z tłumaczeniem","translationIssue","thumb-down"],["Problem z przykładami/kodem","samplesCodeIssue","thumb-down"],["Inne","otherDown","thumb-down"]],["Ostatnia aktualizacja: 2024-08-21 UTC."],[[["The `getChildren()` method retrieves all directly nested blocks within the current block, including those in value and statement inputs."],["This method excludes connections on output tabs and preceding statements."],["It returns an array of blocks, optionally sorted by position based on the `ordered` parameter."]]],["The `Block.getChildren()` method retrieves an array of blocks directly nested within a given block. It includes blocks connected to value and statement inputs, and any following statements, but excludes blocks connected to output tabs or preceding statements. The method accepts a boolean parameter, `ordered`, to determine if the returned list of blocks should be sorted by position from top to bottom. The method returns an array of `Block` objects.\n"]]