MCPcopy
hub / github.com/RaspberryPiFoundation/blockly / getFieldValue

Method getFieldValue

packages/blockly/core/block.ts:1222–1228  ·  view source on GitHub ↗

* Returns the language-neutral value of the given field. * * @param name The name of the field. * @returns Value of the field or null if field does not exist.

(name: string)

Source from the content-addressed store, hash-verified

1220 * @returns Value of the field or null if field does not exist.
1221 */
1222 getFieldValue(name: string): AnyDuringMigration {
1223 const field = this.getField(name);
1224 if (field) {
1225 return field.getValue();
1226 }
1227 return null;
1228 }
1229
1230 /**
1231 * Sets the value of the given field for this block.

Callers 15

buildTooltipForDropdownFunction · 0.80
changeListenerFunction · 0.80
deleteVariableFunction · 0.80
updateMutatorFlyoutFunction · 0.80
text.tsFile · 0.80
CHARAT_EXTENSIONFunction · 0.80
lists.tsFile · 0.80
inputAriaLabelProviderFunction · 0.80
math.tsFile · 0.80
procedures.tsFile · 0.80
block_test.jsFile · 0.80

Calls 2

getFieldMethod · 0.95
getValueMethod · 0.45

Tested by

no test coverage detected