Hello dear community!
I want to install GUI Layout Toolbox inside a function with only code. I am currently using 2018a and earlier versions. I have already downloaded both .zip file and .mltbx file from FEX. (version 2.3.4)
I have extracted .zip file and added the codes folder inside my main app folder and added all folders and subfolders into Matlab path with addpath. I runned my app's main function which includes constructGUI.m method which creates a figure and moves the figure center with movegui.
It gave me the error below:
Error using get (line 13)
uiextras.get has been removed.
Error in matlab.ui.internal.legacyMoveGUI (line 88)
old0units = get(0, 'Units');
Error in movegui (line 125)
matlab.ui.internal.legacyMoveGUI(fig, position);
The reason of this error I think is the set.m and get.m functions inside the GUI Layout Toolbox's uiextras folder. Those two contradict with Matlab's built-in set&get methods.
So my question is How can I install it without opening the licence agreement screen? And get rid of the above error?
Here is my code below:
function mainGUI = mainFunc()
addpath([cd,'\','creatorGUI']);
addpath([cd,'\','helperGUI']);
verStruct = ver('layout');
if isempty(verStruct)
fullToolboxPath = [cd, '\GUI Layout Toolbox 2.3.4.mltbx'];
newAddon = matlab.addons.install(fullToolboxPath,true);
end
if isempty(findall(0,'Tag','MainFigure'))
appObj = View.myApp();
mainGUI = appObj.constructGUI;
else
warndlg('App is already open', 'Warning!','modal');
end
end
I really apreciate your help. Thank you very much for your time.