Encuesta de investigación: Cuéntanos sobre tu experiencia con Blockly
Comenzar encuesta
blockly > Procedimientos > IProcedureModel > insertParameter
Método Procedures.IProcedureModel.insertParameter()
Inserta un parámetro en la lista de parámetros.
Para mover un parámetro, primero bórralo y, luego, vuelve a insertarlo.
Signature:
insertParameter(parameterModel: IParameterModel, index: number): this;
Parámetros
Muestra:
esto
Salvo que se indique lo contrario, el contenido de esta página está sujeto a la licencia Atribución 4.0 de Creative Commons, y los ejemplos de código están sujetos a la licencia Apache 2.0. Para obtener más información, consulta las políticas del sitio de Google Developers. Java es una marca registrada de Oracle o sus afiliados.
Última actualización: 2024-09-12 (UTC)
[null,null,["Última actualización: 2024-09-12 (UTC)"],[[["The `insertParameter` method adds a parameter to a procedure's parameter list within Blockly's Procedures namespace."],["To reposition a parameter, it must first be removed with a separate operation and then reinserted using `insertParameter` at the desired index."],["The method requires an `IParameterModel` object representing the new parameter and an index specifying its position within the list."]]],["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"]]