Survei Riset: Ceritakan pengalaman Anda dengan Blockly
Mulai survei
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
blockly > Input > makeConnection
Membuat koneksi berdasarkan jenis blok sumber input ini. Menangani pembuatan koneksi headless untuk blok headless dan koneksi yang dirender dengan benar untuk blok yang dirender.
Tanda Tangan:
protected makeConnection(type: ConnectionType): Connection;
Parameter
Hasil:
Koneksi
koneksi jenis yang diberikan, yaitu koneksi headless atau koneksi yang dirender, berdasarkan jenis blok sumber input ini.
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2024-08-24 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2024-08-24 UTC."],[[["The `Input.makeConnection()` method creates a Connection object, either headless or rendered, matching the input's source block type."],["It uses the provided `ConnectionType` to determine the type of connection to construct."],["This method is primarily used internally for building connections between blocks within Blockly."]]],["The `Input.makeConnection()` method creates a connection, adapting to the source block's type. It accepts a `ConnectionType` parameter and returns a `Connection` object. This method intelligently determines whether to construct a headless connection for headless blocks or a rendered connection for rendered blocks. The core action is to generate the appropriate connection based on the block type.\n"]]