blockly > Blockieren > removeInput
Eingabe aus diesem Block entfernen.
Unterschrift:
removeInput(name: string, opt_quiet?: boolean): boolean;
Parameter
Parameter |
Typ |
Beschreibung |
Name |
String |
Der Name der Eingabe. |
opt_quiet |
boolean |
(Optional) "True", um einen Fehler zu vermeiden, wenn keine Eingabe vorhanden ist. |
Gibt zurück:
boolean
"True", wenn der Vorgang erfolgreich ist, "false", wenn keine Eingabe vorhanden ist und opt_quiet auf "true" gesetzt ist.
Ausnahmen
{Error}, wenn die Eingabe nicht vorhanden und opt_quiet nicht „true“ ist
Sofern nicht anders angegeben, sind die Inhalte dieser Seite unter der Creative Commons Attribution 4.0 License und Codebeispiele unter der Apache 2.0 License lizenziert. Weitere Informationen finden Sie in den Websiterichtlinien von Google Developers. Java ist eine eingetragene Marke von Oracle und/oder seinen Partnern.
Zuletzt aktualisiert: 2024-11-08 (UTC).
[null,null,["Zuletzt aktualisiert: 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"]]