blockly > Block > removeInput
یک ورودی را از این بلوک حذف کنید.
امضا:
removeInput(name: string, opt_quiet?: boolean): boolean;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
نام | رشته | نام ورودی. |
opt_quiet | بولی | (اختیاری) درست برای جلوگیری از خطا در صورت عدم وجود ورودی. |
برمی گرداند:
بولی
اگر عملیات موفقیت آمیز باشد درست است، اگر ورودی وجود نداشته باشد نادرست است و opt_quiet درست است.
استثنائات
{ خطا } اگر ورودی موجود نباشد و opt_quiet درست نباشد.
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی."],[[["The `removeInput()` method is used to delete an input from a Blockly block using the input's name."],["The method optionally takes a boolean, `opt_quiet`, to suppress errors if the specified input is not found."],["`removeInput()` returns `true` if the removal is successful, and `false` if `opt_quiet` is true and the input doesn't exist."],["An error is thrown if the input is not found and `opt_quiet` is not set to `true`."]]],["The `Block.removeInput()` method removes an input from a block using the input's name. It accepts two parameters: `name` (a string specifying the input's name) and an optional `opt_quiet` (a boolean). If `opt_quiet` is true, the method returns false if the input is absent. If `opt_quiet` is false (or omitted) and the input is not found, it throws an error. The method returns `true` if the input is successfully removed.\n"]]