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
Error using matlab.internal.webwindow/executeJS (line 701)
Error executing JavaScript command:
JavaScript error: Uncaught TypeError: dojo.query is not a function at line 1 column 18 in undefined
Error in mlapptools/getWidgetID (line 345)
widgetID = win.executeJS(widgetquerystr);
Error in mlapptools.getWebElements (line 104)
widgetID = mlapptools.getWidgetID(win, mlapptools.getDataTag(uiElement));
Error in mlapptools.fontColor (line 54)
[win, widgetID] = mlapptools.getWebElements(uiElement);
Error in trialcode (line 2)
mlapptools.fontColor(myGUI.TextArea, 'aqua');
I tried running the code now - it resulted in an error on my 1st attempt, then it was ok. This sort of Heisenbug makes me think it is related to the logic that determines whether the figure finished loading (asynchronously...).
Please try to run the 1st line separately, make sure that the figure is loaded, then run the 2nd line.
I still need a bit of time to check some things out but it looks good for the most part.
It does regress the issue identified & fixed in #5. 2bd87fc asserts that getWebWindow will get the ancestor automatically but it does not in the uipanel case:
Reference to non-existent field 'PlatformHost'.
Error in mlapptools.getWebWindow (line 121)
win = struct(hController.PlatformHost).CEF;
Error in mlapptools.getWebElements (line 103)
win = mlapptools.getWebWindow(uiElement);
Error in mlapptools.fontWeight (line 67)
[win, widgetID] = mlapptools.getWebElements(uiElement);
Error in trialcode (line 6)
mlapptools.fontWeight(txa, 'bold');
Adding the ancestor check to getWebWindow quickly fixes this issue.
This could also affect waitTillFigureLoaded since it assumes it's being passed a figure input, which might not necessarily be the case because the type enforcement happens elsewhere. That being said, it doesn't look like it will cause an overt error since it's checking for existence of struct(hFig).Controller, which is still present with a uipanel input.
It would probably be best to go through and check on all of the input assumptions and make sure they're correct and type enforced as early as appropriate.
Activity
sco1 commentedon Jan 2, 2018
Mac
ver:Windows
ver:Dev-iL commentedon Jan 2, 2018
I tried running the code now - it resulted in an error on my 1st attempt, then it was ok. This sort of Heisenbug makes me think it is related to the logic that determines whether the figure finished loading (asynchronously...).
Please try to run the 1st line separately, make sure that the figure is loaded, then run the 2nd line.
sco1 commentedon Jan 2, 2018
Confirming that executing the figure generating code first does resolve the issue on both OSes
sco1 commentedon Jan 2, 2018
Is this related to the issues we've run into previously with #1?
Dev-iL commentedon Jan 3, 2018
@sco1 Yes, I believe these issues are related.
I think I came up with a better testing method based on the ideas in the other issue. Please test the solution I uploaded to my fork: Dev-iL@697f6c9
If it works for you, I'll merge it and we can close the issues (at least until a new MATLAB version comes out).
sco1 commentedon Jan 3, 2018
I still need a bit of time to check some things out but it looks good for the most part.
It does regress the issue identified & fixed in #5. 2bd87fc asserts that
getWebWindowwill get the ancestor automatically but it does not in theuipanelcase:Adding the
ancestorcheck togetWebWindowquickly fixes this issue.This could also affect
waitTillFigureLoadedsince it assumes it's being passed afigureinput, which might not necessarily be the case because the type enforcement happens elsewhere. That being said, it doesn't look like it will cause an overt error since it's checking for existence ofstruct(hFig).Controller, which is still present with auipanelinput.It would probably be best to go through and check on all of the input assumptions and make sure they're correct and type enforced as early as appropriate.
Dev-iL commentedon Jan 3, 2018
It doesn't regress, I just didn't add this change on my branch so as to avoid merge issues later on :)
Merge pull request #8 from Dev-iL/develop
sco1 commentedon Jan 7, 2018
Should be fixed with #8 (947c54e)