Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
blockly > Block > setPreviousStatement
Block.setPreviousStatement()-Methode
Legen Sie fest, ob dieser Block an den unteren Teil eines anderen Blocks angehängt werden kann.
Unterschrift:
setPreviousStatement(newBoolean: boolean, opt_check?: string | string[] | null): void;
Parameter
Parameter |
Typ |
Beschreibung |
newBoolean |
boolean |
„True“, wenn es eine vorherige Anweisung geben kann. |
opt_check |
string | string[] | null |
Optional: Typ der Erklärung oder Liste der Erklärungstypen. „Null“/„undefiniert“, wenn jeder Typ verbunden werden könnte. |
Gibt zurück:
void
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-30 (UTC).
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Benötigte Informationen nicht gefunden","missingTheInformationINeed","thumb-down"],["Zu umständlich/zu viele Schritte","tooComplicatedTooManySteps","thumb-down"],["Nicht mehr aktuell","outOfDate","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Problem mit Beispielen/Code","samplesCodeIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2024-11-30 (UTC)."],[[["The `setPreviousStatement` method determines if a block can connect to the bottom of another block."],["It accepts a boolean argument indicating whether a previous connection is allowed and an optional argument to specify accepted connection types."],["Calling this method affects how blocks are visually presented and logically connected in Blockly workspaces."]]],["The `setPreviousStatement` method determines if a block can connect to the bottom of another. It accepts a boolean (`newBoolean`) to enable or disable this chaining capability. An optional parameter (`opt_check`) allows specifying allowed statement types, either as a single string or an array of strings; omitting this permits any type. The method modifies the block's properties and does not return any value.\n"]]