View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0019269 | MMW 5 | Extensions framework | public | 2022-07-21 13:41 | 2022-08-30 23:50 |
Reporter | zvezdan | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | reopened | ||
Fixed in Version | 5.0.4 | ||||
Summary | 0019269: There are methods that are working only from the main window | ||||
Description | Many objects/methods are working only from the main window, but there are situations when they are needed to work from dialog boxes as well, e.g. if a dialog box is modeless. MM4 didn't have such issues. For example, I could have used SDB.MainTracksWindow.Refresh in dialog box and it would refresh the main tracklist without any problem. But it is not such case with uitools.refreshView() in MM5. Here are objects and/or methods that doesn't work correctly within dialog boxes or they could cause errors: - uitools (any method), - nodeUtils (any method), - navUtils (any method), - ... (to be added). I am using var __window = app.dialogs.getMainWindow()._window as a workaround, but I think that you should make it easier for scipters and allow their use in dialog boxes without workarounds. | ||||
Tags | No tags attached. | ||||
Fixed in build | 2659 | ||||
|
Yes, the mentioned methods are performed in the window context so they really are executed for the current window. As for the __window = app.dialogs.getMainWindow()._window I think this is quite dangerous workaround as then also methods that are meant to be performed in the dialog window context are performed in the Main window. (e.g. window.uitools.unselectAllText) Nevertheless you are true that methods like window.uitools.refreshView are probably always meant to be executed within the main window -- so tweaking them makes sense. Something like: if (!window.isMainWindow) { var mainWnd = app.dialogs.getMainWindow(); mainWnd.getValue('uitools').refreshView(); } |
|
Fixed in 5.0.4.2658 i.e. uitools.refrehView, whole navUtils and nodeUtils are now always executed in the main window context (because of the following code change): |
|
Maybe not only uitools.refrehView() from uitools, but others as well, like uitools.getSelectedTracklist(). |
|
Re-opened as this caused a regression in 2658: Accessing Properties > Classification throws exception now (because of the changes to nodeUtils for the related Playlists tree there). The reason is that Properties dialog uses TrackPlaylistsTree component that defines some own nodeHandlers in the Properties window context, but nodeUtils accesses nodeHandlers of the main window instead. So I reverted the "fix" in 2658 for nodeUtils (to keep the window context again). => Fixed in 2659 |
|
Verified 2661 No new regressions found |