blockly > مربّع حوار > setConfirm
الدالة box.setConfirm()
تحدد الدالة التي سيتم تشغيلها عند استدعاء Blockly.dialog.confirm() .
Signature:
export declare function setConfirm(confirmFunction: (p1: string, p2: (p1: boolean) => void) => void): void;
المعلمات
المعلمة |
النوع |
الوصف |
confirmFunction |
(p1: سلسلة، p2: (p1: منطقية) => باطل) => فراغ |
الدالة المطلوب تشغيلها. |
المرتجعات:
فراغ
إنّ محتوى هذه الصفحة مرخّص بموجب ترخيص Creative Commons Attribution 4.0 ما لم يُنصّ على خلاف ذلك، ونماذج الرموز مرخّصة بموجب ترخيص Apache 2.0. للاطّلاع على التفاصيل، يُرجى مراجعة سياسات موقع Google Developers. إنّ Java هي علامة تجارية مسجَّلة لشركة Oracle و/أو شركائها التابعين.
تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)
[null,null,["تاريخ التعديل الأخير: 2024-08-22 (حسب التوقيت العالمي المتفَّق عليه)"],[[["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"]]