Forum Migration Notice
We're transitioning to a more modern community platform by the end of this year. Learn about the upcoming changes and what to expect.

Popup dialog in AppStudio

Is there away to get popup dialogs in AppStudio? That was possible in AppMaker.
Tagged:

Answers

  • yitong
    yitong
    edited December 11
    You can use the TComponents.Popup_A interface to implement a simple Popup component. If you're accustomed to coding with the FPComponent component, you can also directly use the FPComponents.Popup_A interface in AppStudio to write your code.

    Here are some examples:

    Danger:

    try {   // do something } catch (e) {   TComponents.Popup_A.danger('Something went wrong', [e.message, e.description]); }
    Error:

    try {   throw new Error("Whoops!"); } catch (e) {   TComponents.Popup_A.error(e, 'Custom title'); };

    Info:

    TComponents.Popup_A.info(  "Important information!",  [    "For your information, this is a popup dialog.",    "",    "Further information can be given here!"  ], function (action) {   console.log("OK button was clicked") });