रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
ब्लॉकली > रजिस्ट्री > getObject
Registry.getObject() फ़ंक्शन
दिए गए नाम और टाइप के लिए ऑब्जेक्ट हासिल करता है.
हस्ताक्षर:
export declare function getObject<T>(type: string | Type<T>, name: string, opt_throwIfMissing?: boolean): T | null;
पैरामीटर
पैरामीटर |
टाइप |
ब्यौरा |
टाइप |
स्ट्रिंग | टाइप<T> |
प्लगिन का टाइप. (उदाहरण के लिए कैटगरी) |
नाम |
स्ट्रिंग |
प्लगिन का नाम. (उदाहरण logic_category) |
opt_throwIfMissing |
बूलियन |
(ज़रूरी नहीं) अगर हमें ऑब्जेक्ट नहीं मिलता है, तो गड़बड़ी की जानकारी दें या नहीं. |
लौटाए जाने वाले प्रॉडक्ट:
ट्रि | शून्य
दिए गए नाम और टाइप या शून्य वाला ऑब्जेक्ट, अगर कोई भी मौजूद नहीं है.
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया.
[[["समझने में आसान है","easyToUnderstand","thumb-up"],["मेरी समस्या हल हो गई","solvedMyProblem","thumb-up"],["अन्य","otherUp","thumb-up"]],[["वह जानकारी मौजूद नहीं है जो मुझे चाहिए","missingTheInformationINeed","thumb-down"],["बहुत मुश्किल है / बहुत सारे चरण हैं","tooComplicatedTooManySteps","thumb-down"],["पुराना","outOfDate","thumb-down"],["अनुवाद से जुड़ी समस्या","translationIssue","thumb-down"],["सैंपल / कोड से जुड़ी समस्या","samplesCodeIssue","thumb-down"],["अन्य","otherDown","thumb-down"]],["आखिरी बार 2025-07-25 (UTC) को अपडेट किया गया."],[[["The `registry.getObject()` function retrieves an object from Blockly's registry based on its type and name."],["It accepts the object's type, name, and an optional flag to throw an error if the object is not found."],["The function returns the requested object if found, otherwise it returns null."]]],["The `registry.getObject()` function retrieves a registered object based on its type and name. It accepts a `type` (string or Type), `name` (string), and an optional `opt_throwIfMissing` (boolean) parameter. If the object is found, it is returned; otherwise, it returns `null` or throws an error if `opt_throwIfMissing` is set to `true`. The `type` specifies the plugin type (e.g., \"Category\"), and `name` is the plugin's identifier (e.g., \"logic_category\").\n"]]