調査アンケート: Blockly のご利用体験についてお聞かせください
アンケートを開始
ブロックする >ワークスペース >getVariableById
Workspace.getVariableById() メソッド
指定された ID で変数を検索して返します。見つからなかった場合は null を返します。
署名:
getVariableById(id: string): VariableModel | null;
パラメータ
パラメータ |
型 |
説明 |
id |
文字列 |
確認する ID。 |
戻り値:
VariableModel |null
指定された ID を持つ変数。
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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."]]],[]]