סקר מחקר: נשמח לשמוע על החוויה שלך עם Blockly
לפתיחת הסקר
blockly > סביבת עבודה > getVariableById
שיטת Workspace.getVariableById()
מוצאים את המשתנה לפי המזהה הנתון ומחזירים אותו. אם הערך לא נמצא, מוחזר null.
Signature:
getVariableById(id: string): VariableModel | null;
פרמטרים
פרמטר |
סוג |
תיאור |
id [מזהה] |
מחרוזת |
המזהה שצריך לבדוק. |
החזרות:
VariableModel | null
המשתנה עם המזהה הנתון.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2024-08-22 (שעון UTC).
[null,null,["עדכון אחרון: 2024-08-22 (שעון UTC)."],[[["The `Workspace.getVariableById()` method is used to locate a variable within a workspace using its unique ID."],["If a variable with the provided ID exists, the method returns a `VariableModel` object representing that variable; otherwise, it returns `null`."],["This method accepts a single parameter: a string representing the ID of the variable to search for."]]],[]]