You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/dialog-api.md
This how-to describes how to open a modal dialog in Studio Pro from an extension, allowing you to display web content.
10
10
11
+
It also describes how to show a progress dialog that follows a sequence of steps and returns a result upon completion.
12
+
11
13
## Prerequisites
12
14
13
15
This how-to uses the results of [Get Started with the Web Extensibility API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/getting-started/). Please complete that how-to before starting this one. You should also be familiar with creating menus as described in [Create a Menu Using Web API](/apidocs-mxsdk/apidocs/web-extensibility-api-11/menu-api/).
@@ -225,6 +227,118 @@ You can also modify the dimensions of a dialog using the dialog API's `update` m
225
227
226
228
Youcanalsomodifythedialog's dimensions while it is open.
It is recommended to always wrap your step action body in a `try/catch` block so that you can be in control of the error that gets returned to the user:
323
+
324
+
```typescript
325
+
const step:ProgressDialogStep= {
326
+
title: "Step X",
327
+
description: "Executing Step X",
328
+
action: async () => {
329
+
try {
330
+
// perform action
331
+
returntrue;
332
+
} catch (error:Error|unknown) {
333
+
returnerrorinstanceofError?error.message:"An error occurred while performing Step X";
334
+
}
335
+
}
336
+
};
337
+
```
338
+
339
+
When running, the progress dialog will look like this:
If you would like to provide us with additional feedback, you can complete a small [survey](https://survey.alchemer.eu/s3/90801191/Extensibility-Feedback).
Copy file name to clipboardExpand all lines: content/en/docs/apidocs-mxsdk/apidocs/studio-pro-11/extensibility-api/web/web-extensions-howtos/progress-dialogs.md
0 commit comments