Stay organized with collections
Save and categorize content based on your preferences.
blockly > Names > populateVariables
Names.populateVariables() method
Generate names for user variables, but only ones that are being used.
Signature:
populateVariables(workspace: Workspace): void;
Parameters
Parameter |
Type |
Description |
workspace |
Workspace |
Workspace to generate variables from. |
Returns:
void
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eNames.populateVariables()\u003c/code\u003e method generates names for user variables that are actively being used within a Blockly workspace.\u003c/p\u003e\n"],["\u003cp\u003eThis method accepts a Blockly Workspace object as input to identify the relevant variables.\u003c/p\u003e\n"],["\u003cp\u003eIt does not return any value, modifying the workspace directly by assigning names to the active user variables.\u003c/p\u003e\n"]]],[],null,["[blockly](./blockly.md) \\\u003e [Names](./blockly.names_class.md) \\\u003e [populateVariables](./blockly.names_class.populatevariables_1_method.md)\n\nNames.populateVariables() method\n--------------------------------\n\nGenerate names for user variables, but only ones that are being used.\n\n**Signature:** \n\n populateVariables(workspace: Workspace): void;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|-------------------------------------------|---------------------------------------|\n| workspace | [Workspace](./blockly.workspace_class.md) | Workspace to generate variables from. |\n\n**Returns:**\n\nvoid"]]