रिसर्च सर्वे: Blockly के साथ अपने अनुभव के बारे में हमें बताएं
सर्वे शुरू करें
कस्टम इनपुट बनाएं
संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
पसंद के मुताबिक इनपुट बनाने के लिए, आपको Input
को सब-क्लास करना होगा या इनमें से कोई एक
इसकी सब-क्लास मौजूद हैं.
class MyInput extends Blockly.inputs.Input {
// The constructor should always take in a name and a block to be compatible
// with JSON block definitions.
constructor(name, block) {
super(name, block);
// etc...
}
}
विकल्प के तौर पर, कनेक्शन बनाएं
अगर आपको अपने इनपुट में कनेक्शन बनाना है, तो उसे
कंस्ट्रक्टर बनाने के लिए, makeConnection
मेथड को कॉल करके देखें.
constructor(name, block) {
super(name, block);
this.connection = this.makeConnection(ConnectionType.INPUT_VALUE);
}
JSON ब्लॉक डेफ़िनिशन में कस्टम इनपुट का इस्तेमाल करने के लिए
आपको इसे रजिस्टर करके किसी स्ट्रिंग से जोड़ना होगा.
class MyInput extends Blockly.inputs.Input {}
Blockly.registry.register(Blockly.registry.Type.INPUT, 'my_input', MyInput);
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2025-04-14 (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-04-14 (UTC) को अपडेट किया गया."],[[["Subclass `Blockly.inputs.Input` to create a custom input, ensuring the constructor accepts a name and block for JSON compatibility."],["Optionally create a connection for the input using the `makeConnection` method within the constructor."],["Register the custom input with `Blockly.registry` to enable its usage in JSON block definitions, associating it with a unique string identifier."],["Custom inputs cannot replace built-in inputs, nor can custom JSON configuration be added to built-in inputs."]]],["To create a custom input, subclass the `Input` class, including a constructor that accepts a name and block. Optionally, create a connection within the constructor using the `makeConnection` method. To use the custom input in JSON block definitions, register it with `Blockly.registry.register`, associating it with a unique string. Note that unlike custom fields, built-in inputs cannot be overridden and do not accept custom JSON configurations.\n"]]