Stay organized with collections
Save and categorize content based on your preferences.
blockly > Procedures > IProcedureModel > insertParameter
Procedures.IProcedureModel.insertParameter() method
Inserts a parameter into the list of parameters.
To move a parameter, first delete it, and then re-insert.
Signature:
insertParameter(parameterModel: IParameterModel, index: number): this;
Parameters
Returns:
this
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\u003einsertParameter\u003c/code\u003e method adds a parameter to a procedure's parameter list within Blockly's Procedures namespace.\u003c/p\u003e\n"],["\u003cp\u003eTo reposition a parameter, it must first be removed with a separate operation and then reinserted using \u003ccode\u003einsertParameter\u003c/code\u003e at the desired index.\u003c/p\u003e\n"],["\u003cp\u003eThe method requires an \u003ccode\u003eIParameterModel\u003c/code\u003e object representing the new parameter and an index specifying its position within the list.\u003c/p\u003e\n"]]],["The `insertParameter` method, part of the `Procedures.IProcedureModel`, adds a parameter to a list of parameters. It takes two inputs: `parameterModel` of type `IParameterModel`, and `index` (a number), specifying the insertion point. To move a parameter, one must first delete it and then use this function to re-insert it at the intended `index`. This method returns the instance of the object it was called on.\n"],null,[]]