blockly > گفتگو > setConfirm
تابع dialog.setConfirm().
تابعی را تنظیم می کند که هنگام فراخوانی ()Blockly.dialog.confirm اجرا شود.
امضا:
export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolean) => void) => void): void;
پارامترها
پارامتر | تایپ کنید | توضیحات |
---|
تایید تابع | (p1: رشته، p2: (p1: boolean) => void) => void | تابعی که باید اجرا شود. |
برمی گرداند:
باطل
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-04 بهوقت ساعت هماهنگ جهانی."],[[["The `dialog.setConfirm()` function allows you to define a custom function that will be executed when the `Blockly.dialog.confirm()` method is called."],["This custom function receives the confirmation message and a callback function as parameters, enabling you to handle user confirmation within your application logic."],["The callback function should be used to signal the user's choice (true for confirm, false for cancel) back to the Blockly dialog system."]]],["The `dialog.setConfirm()` function sets a custom function to execute when `Blockly.dialog.confirm()` is invoked. This function, passed as `confirmFunction`, takes two parameters: a string (`p1`) and a callback function (`p2`). The callback function `p2` accepts a boolean parameter. The `setConfirm()` function itself does not return any value. Its main purpose is defining the behavior of the confirmation dialog.\n"]]