blockly > Zablokuj > removeInput
Usuń dane wejściowe z tego bloku.
Podpis:
removeInput(name: string, opt_quiet?: boolean): boolean;
Parametry
Parametr |
Typ |
Opis |
nazwa |
ciąg znaków |
Nazwa danych wejściowych. |
opt_quiet |
wartość logiczna |
(Opcjonalnie) Wartość „True” (prawda) zapobiega wyświetlaniu błędu, jeśli nie ma danych wejściowych. |
Zwroty:
wartość logiczna
Wartość true, jeśli operacja się powiedzie, false, jeśli nie ma danych wejściowych, a parametr opt_quiet ma wartość true (prawda).
Wyjątki
{Error} jeśli dane wejściowe są nieobecne i opcja opt_quiet nie jest ustawiona na wartość true.
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-11-08 UTC.
[null,null,["Ostatnia aktualizacja: 2024-11-08 UTC."],[[["The `removeInput()` method is used to delete an input from a Blockly block using the input's name."],["The method optionally takes a boolean, `opt_quiet`, to suppress errors if the specified input is not found."],["`removeInput()` returns `true` if the removal is successful, and `false` if `opt_quiet` is true and the input doesn't exist."],["An error is thrown if the input is not found and `opt_quiet` is not set to `true`."]]],["The `Block.removeInput()` method removes an input from a block using the input's name. It accepts two parameters: `name` (a string specifying the input's name) and an optional `opt_quiet` (a boolean). If `opt_quiet` is true, the method returns false if the input is absent. If `opt_quiet` is false (or omitted) and the input is not found, it throws an error. The method returns `true` if the input is successfully removed.\n"]]