Stay organized with collections
Save and categorize content based on your preferences.
blockly > FieldVariable > doValueUpdate_
FieldVariable.doValueUpdate_() method
Update the value of this variable field, as well as its variable and text.
The variable ID should be valid at this point, but if a variable field validator returns a bad ID, this could break.
Signature:
protected doValueUpdate_(newId: string): void;
Parameters
Parameter |
Type |
Description |
newId |
string |
The value to be saved. |
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."],[[["The `doValueUpdate_` method updates the FieldVariable's value, its associated variable, and displayed text using the provided `newId`."],["This method assumes the `newId` is a valid variable ID; however, issues may arise if a validator returns an invalid ID."],["`doValueUpdate_` is a protected method that takes a single string argument (`newId`) representing the new value and returns void."]]],[]]