গবেষণা সমীক্ষা: ব্লকলি
স্টার্ট সার্ভে নিয়ে আপনার অভিজ্ঞতা সম্পর্কে আমাদের বলুন
ব্লকলি > কনটেক্সটমেনুরেজিস্ট্রি > রেজিস্টার
একটি রেজিস্ট্রি আইটেম নিবন্ধন করে।
স্বাক্ষর:
register(item: RegistryItem): void;
পরামিতি
প্যারামিটার | টাইপ | বর্ণনা |
---|
আইটেম | রেজিস্ট্রি আইটেম | নিবন্ধন করতে প্রসঙ্গ মেনু আইটেম. |
রিটার্ন:
অকার্যকর
ব্যতিক্রম
{ ত্রুটি } যদি প্রদত্ত আইডি সহ একটি আইটেম ইতিমধ্যেই বিদ্যমান থাকে।
অন্য কিছু উল্লেখ না করা থাকলে, এই পৃষ্ঠার কন্টেন্ট Creative Commons Attribution 4.0 License-এর অধীনে এবং কোডের নমুনাগুলি Apache 2.0 License-এর অধীনে লাইসেন্স প্রাপ্ত। আরও জানতে, Google Developers সাইট নীতি দেখুন। Java হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-01-08 UTC-তে শেষবার আপডেট করা হয়েছে।
[null,null,["2025-01-08 UTC-তে শেষবার আপডেট করা হয়েছে।"],[[["Registers a context menu item, allowing it to be displayed in Blockly's context menus."],["Requires a RegistryItem object as input, defining the item's properties and behavior."],["Throws an error if attempting to register an item with an ID that's already in use."],["Successful registration makes the item available for inclusion within context menus."]]],["The `ContextMenuRegistry.register()` method adds a `RegistryItem` to the context menu. It accepts one parameter, `item`, which represents the context menu item being registered. This method returns nothing (`void`). If a menu item with the same ID already exists, the method throws an `Error`. The core action is the registration of a context menu item for later use.\n"]]