Closed sco1 closed 6 years ago
Mac ver
:
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.3.0.713579 (R2017b)
MATLAB License Number:
Operating System: Mac OS X Version: 10.13.2 Build: 17C88
Java Version: Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.3 (R2017b)
Windows ver
:
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.3.0.713579 (R2017b)
MATLAB License Number:
Operating System: Microsoft Windows 10 Enterprise Version 10.0 (Build 14393)
Java Version: Java 1.8.0_121-b13 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
-----------------------------------------------------------------------------------------------------
MATLAB Version 9.3 (R2017b)
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.
Confirming that executing the figure generating code first does resolve the issue on both OSes
Is this related to the issues we've run into previously with #1?
@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: https://github.com/Dev-iL/mlapptools/commit/697f6c9d5fe74d73667440e284d92520dadd397a
If it works for you, I'll merge it and we can close the issues (at least until a new MATLAB version comes out).
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.
It doesn't regress, I just didn't add this change on my branch so as to avoid merge issues later on :)
Should be fixed with #8 (947c54e)
I'm receiving a JS error every time I attempt to modify a UI element.
For example, the demos from the readme:
Throws the following:
On both Windows & Mac