blockly > Blocco > setFieldValue
Metodo Block.setFieldValue()
Imposta il valore del campo specificato per questo blocco.
Firma:
setFieldValue(newValue: any, name: string): void;
Parametri
Parametro |
Tipo |
Descrizione |
newValue |
qualsiasi |
Il valore da impostare. |
nome |
stringa |
Il nome del campo di cui impostare il valore. |
Resi:
nullo
Salvo quando diversamente specificato, i contenuti di questa pagina sono concessi in base alla licenza Creative Commons Attribution 4.0, mentre gli esempi di codice sono concessi in base alla licenza Apache 2.0. Per ulteriori dettagli, consulta le norme del sito di Google Developers. Java è un marchio registrato di Oracle e/o delle sue consociate.
Ultimo aggiornamento 2024-11-08 UTC.
[null,null,["Ultimo aggiornamento 2024-11-08 UTC."],[[["The `setFieldValue` method updates the value of a specific field within a Blockly block."],["It requires two parameters: `newValue` specifying the desired value, and `name` indicating the target field to modify."],["This method does not return any value (void) after execution."]]],["The `Block.setFieldValue()` method allows modification of a block's field value. It takes two parameters: `newValue`, which is the desired value (of any type), and `name`, a string representing the target field's name. Executing this method updates the specified field within the block with the provided `newValue`. The method returns no value (void).\n"]]