סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
blockly > Block > setPreviousStatement
השיטה Block.setPreviousStatement()
מגדירים אם הבלוק הזה יכול להצטרף לבלוק אחר בתחתית הקוד.
Signature:
setPreviousStatement(newBoolean: boolean, opt_check?: string | string[] | null): void;
פרמטרים
פרמטר |
סוג |
תיאור |
newBoolean |
בוליאני |
הערך True אם יכולה להיות הצהרה קודמת. |
opt_check |
string | string[] | null |
(אופציונלי) סוג משפט או רשימה של סוגי משפטים. Null/undefined אם אפשר לקשר כל סוג. |
החזרים:
void
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-11-30 (שעון UTC).
[[["התוכן קל להבנה","easyToUnderstand","thumb-up"],["התוכן עזר לי לפתור בעיה","solvedMyProblem","thumb-up"],["סיבה אחרת","otherUp","thumb-up"]],[["חסרים לי מידע או פרטים","missingTheInformationINeed","thumb-down"],["התוכן מורכב מדי או עם יותר מדי שלבים","tooComplicatedTooManySteps","thumb-down"],["התוכן לא עדכני","outOfDate","thumb-down"],["בעיה בתרגום","translationIssue","thumb-down"],["בעיה בדוגמאות/בקוד","samplesCodeIssue","thumb-down"],["סיבה אחרת","otherDown","thumb-down"]],["עדכון אחרון: 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"]]