Effacer les filtres
Effacer les filtres

Matlab2018b on Linux / figure vs uifigure

3 vues (au cours des 30 derniers jours)
Robert Schäfer
Robert Schäfer le 22 Juin 2020
Hi,
I created a data plotting class/app (based on uifigure and other ui components, not via the app designer) on a Win10 machine (ML2019b). Now when trying to run this on linux, the uifigure won't open (a regular figure() opens however).
Output:
>>fig2 = uifigure('Name','test2')
fig2 =
Figure (test2) with properties:
Number: []
Name: 'test2'
Color: [0.9400 0.9400 0.9400]
Position: [1000 918 560 420]
Units: 'pixels'
Show all properties
User abort via ctrl+C
General Error occurred
Unable to display properties for variable fig2 because it refers to a deleted object.
Can anyone help me?
Cheers,
Robert
  1 commentaire
Robert Schäfer
Robert Schäfer le 25 Juin 2020
I narrowed it down to:
In uifigure.m:
% Call the uifigureImpl function to create the uifigure
window = matlab.ui.internal.uifigureImpl(varargin{:});
Where again in uifigureImpl.m:
% internal implementation of uifigure creation
% Copyright 2017 The MathWorks, Inc.
nargoutchk(0,1);
controllerInfo.ControllerClassName = 'matlab.ui.internal.controller.FigureController';
% Create the uifigure, configured for app building
% Set defaults for unsupported properties first.
% After setting ControllerInfo, unsupported property sets will error.
window = appwindowfactory('WindowStyle','normal',...
'DockControls','off',...
'HandleVisibility','off',...
'IntegerHandle','off',...
'MenuBar','none',...
'NumberTitle','off',...
'Toolbar','none',...
'ControllerInfo',controllerInfo,...
'AutoResizeChildren', 'on',...
varargin{:});
% configure the new figure for application building
matlab.ui.internal.FigureServices.configureFigureForAppBuilding(window);
if (nargout > 0)
varargout{1} = window;
end
The line that causes this "stuck" issue is the controller info. Someone who could explain?

Connectez-vous pour commenter.

Réponses (2)

Sahithi Kanumarlapudi
Sahithi Kanumarlapudi le 24 Juil 2020
Hi,
Figures created using 'uifigure' can be opened without any issue irrespective of the platform. You might be trying to view the figure after you have actually closed it once using the close button on the top right corner of the figure. Even the error message shows that you are trying to refer to a deleted object. Try to ensure that the handle is not deleted before you open it.

Robert Schäfer
Robert Schäfer le 24 Juil 2020
Thanks for the answer. The uifigure doesn't even open.
Well I guess it's another problem then, maybe because of doing "my Windows machine -> remote desktop to a Linux machine -> SSH to another Linux machine -> starting Matlab" ...

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Produits


Version

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by