Stay organized with collections
Save and categorize content based on your preferences.
blockly > Field > sourceBlock_
Field.sourceBlock_ property
Block this field is attached to. Starts as null, then set in init.
Signature:
protected sourceBlock_: Block | null;
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."],[[["`sourceBlock_` is a property of the `Field` class in Blockly that stores a reference to the block the field is attached to."],["Initially `null`, it's assigned during the field's initialization (`init`) and holds the parent block instance."],["This property provides a way for the field to interact with its associated block."]]],["The `sourceBlock_` property, found within the `Field` class, represents the block to which a field is connected. Initially, it is set to `null`. During the initialization process, this property is then assigned to the corresponding `Block` instance. It is a protected property, meaning it can be accessed within the class and subclasses, and its type is either a `Block` or `null`.\n"]]